I am learning C++ on my own and was hoping for some feedback on this simple text-to-binary converter. The program runs and I haven't encountered any errors with it yet. Any input is welcome. #include <iostream>#include <string>#include <bitset>using namespace std;int main(){char letter = ' ', playAgain = 'y';string word =  ;cout << \t**Text To Binary Convertor**\n\n;while (playAgain == 'y'){    cout << Please enter a character, word, or phrase: ;    getline (cin, word, '\n');    cout << \nThe binary value for  << word <<  is \n;    for (unsigned int wordPosition = 0; wordPosition < word.size(); ++wordPosition){        letter = word[wordPosition];        bitset <8> binary(letter);        cout << binary;        }    cout << \n\nWould you like to try again? (y/n);    cin >> playAgain;    if (playAgain != 'y'){        cout << \n\nExiting program.;        playAgain = 'n';        }        cin.ignore();}return 0;}
Simple text-to-binary converter written in C++
c++;converting;console
I don't see anything obviously wrong with the code, so that's a good start.You're using a very unusual brace indentation style. Wikipedia calls it Banner Style but I don't think I've ever seen it before.You're checking for playAgain != 'y' in two different places, which is redundant and could lead to bugs if one of them is modified. I'd move that whole second block outside of the main loop.