February 26th, 2002, 01:17 PM
changing type int/double to type char
hey...this could be a real easy question.
How can you change a type int or double to a type char? I need to be able to pass the number to a string so as it prints out the number, not the digits code in ascii.
February 26th, 2002, 02:14 PM
you want to make a string (char or char* ) of a number, not a char, right? use sprintf()
March 27th, 2002, 10:17 AM
You can also static_cast the var....
charVar = static_cast<char>intVar