hi guys, i want to make a GUI application for showing binary search tree using allegro..and i have a problem to convert int (traverse->id) to print it on the screen using allegro's function (textprintf_ex) because it needs a const char*..anyone can help me?
int Number = 123; // number to be converted to a string
string Result; // string which will contain the result
ostringstream convert; // stream used for the conversion
convert << Number; // insert the textual representation of 'Number' in the characters in the stream
Result = convert.str(); // set 'Result' to the contents of the stream
// 'Result' now is equal to "123"
hmmm...i got a little problem here..
why in my program the 'string' in the string Result cannot be read?
it says "string undeclared"
also, ostringstream cannot be read firstly, but i add std:: in front of it, and it can be read..
i also have added #include<string>..but it can't..
can u help me with the 'string' thing??