dimanche 24 février 2019

Printing guarantee of uintX_t and intX_t types

I want to know whether there is a standard if I use uint16_t type for a variable and want to print it out on screen by using std::cout <<, it is printed as number not char. I read on some tutorial websites that uint8_t or int8_t prints doesn't guarantee as character or number. Yet, I can't find any clause or quotation from standard. Do I need always casting to be sure to get the wished output for all these mentioned types?

Aucun commentaire:

Enregistrer un commentaire