Ok so last night I was engaging a friend in a war of talking in different languages(morse code, binary, hex, english...etc) all that good stuff...
Anyhow I wanted to start typing longer sentences and not have to translate the binary from the Ascii decimal value by hand(yes I know there are translators...that do this for you), but I thought. Hey I'm learning C++ why don't I try to write something to convert this for me, should be easy right?
Well I guess I forgot one little detail from the book I'm reading...or something :P
Because when I started testing it all I got was the return value of the memory address instead of the value I wanted :P.
Btw...I dunno if trying to use a 2d array to represent the 26 binary values I would need was a good idea or not...sounded good at the time.
//Newb trying to do Pseudo-code \/
//Get input line - cin.getline(), cin.get()
//Check each character
//Evaluate againt binary table
//Convert to binary
//Output to cout
#include <iostream>
usingnamespace std;
int main()
{
constint btable[26][8] =
{
{0110, 0000} //Example binary. For testing I tried splitting it up since I didn't know if it could handle the full 8bit value the way I was doing it.
};
cout << btable[0] << endl;
return 0;
}