Redoing my previous question since I didn't provide enough detail.
I have a char pointer array, char* token[100]. Let's say I have a double-digit number, like 33.
How do I assign this int into an index in the token array, so that when I print out that token it will give me 33 and not some sort of ASCII value?
char* token[100];
int num = 33;
//How do I assign num into a specific token index, like for example:
token[1] = num;
//When I print out that token index, I want 33 to be printed out
cout << token[1] << endl; // I want to have 33 be the result. Right now I have '!' as an output
char*is a pointer to a location in memory. You have set it to the value 33, which almost certainly isn't within your program's address space. Then you are trying to read a string which you incorrectly assume is stored in that memory location and write it to standard out.33and not42?char *[]and achar []? Do you know the difference between acharand anint? Do you know what an array is? We're asking these questions so we can direct you to the best resources. We need to gauge your level of understanding.