Changing a integer to a char
Posted on 2004-09-24
Ok im newer to C++. All I want to do is increment a pointer and display the address and corresponding value in the address. This will all occur in a loop so a range of values will be displayed. They will be displayed in a Listbox. I am having trouble with casting integers to chars etc. As well as passing the result to the listbox (an error closes the app because im sending the wrong type of string\int or watever) Here is my code: in the for loop is where the problems are. The main thing is getting temp to concatenate things right (casting integers and pointers to chars or pointers to chars or whatever).
void Scan(int Depth, int Number)
for (i=0; i<Depth; i++)
temp = strcat(strcat((char)&sptr," : "),*(char)*sptr);