|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
you want to make a string (char[] or char* ) of a number, not a char, right? use sprintf()
|
|
#3
|
|||
|
|||
|
You can also static_cast the var....
charVar = static_cast<char>intVar ~Trex~ |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > C Programming > changing type int/double to type char |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|