Back for a quicky :
Code:#include <iostream.h> #include <conio.c> char textascii[] = ""; char conbin(char* textstring) { for(int i = 0; i < 10; i++) { textstring[i] = (char)textascii[i]; } } ////////////////////////////////////// int main() { cout << "Enter text...\n"; char text[100]; cin >> text; conbin(text); cout << endl << endl << textascii; cin.get(); cin.get(); return 0; }
I'm not getting any result, where I'm HOPING to get the ASCII value for the letter I'm typing in. I know there is a much simpler way to do it, and that way works, but I suck as things like this ( using arrays, chars, char*s, and making them work together ) which is why I need to work on it.
I also want to make a code to convert a letter / string of text into binary code ( pure groups of 1s and 0s in groups of 8, per letter ), and also into hex...
Finally, how can you read 0x00-style code ( which I believe is Hex too ) ?
Thanks for replies.