#include "Header.h"
usingnamespace std;
int main()
{
string input;
cout << "Enter statement you would like to convert to binary: ";
getline(cin >> ws, input);
}
If this is homework you need to post your attempts or thought process on this...
I think a better (but not really useful answer to your question) would be why in the heck anyone would convert a string to binary. Hex would make much more sense.
My thought process on how you COULD do this... get the ASCII value of each individual character in the string. With the ASCII value, you can easily convert the character to any base system with relative ease. Do a google search on decimal to binary code.
This is not homework and this is my attempt I don't know how to replace character with the binary code that's why I posted it on here so can someone give me some useful information on how I would go about this it would be much appreciated.