I want to print 10°Celsius with printf
function
Normally I would do it like this:
printf("10\xF8Celsius");
where \xF8 is the ANSI code for degree sign. The problem is that the compiler take all hexadecimal characters after \x and tries to convert to a character, basically it takes \F8Ce
and tries to convert it to a character.
I could write it like:
printf("10\xF8 Celsius"); //see additional space
but the question still remains.
How to tell compiler where my hexadecimal code ends? Is it possible?
Note: I used Visual Studio 2015 PRE on a Windows 8.1 to observe this problem (not that this problem is platform specific but just to mention it)