you need to use single quotes around your characters, not double quotes.
'c' is a character, while "s" is a string (pointer to an array of characters).
-Sam
hi,
When I type this :
the result is :Code:printf("%c, %s, %c, %i\n", 133, "Ã*", "Ã*", "Ã*");
In extended ascci table, the code of 'Ã*' is 133.Code:Ã*, Ó, è, 4199050
How can I have the (extended) ascii code from a char string with accents ?
My main goal is to use the ascii code to find letters in a texture to write a text with accent on screen.
Doas another methode exist ?
Thanks
you need to use single quotes around your characters, not double quotes.
'c' is a character, while "s" is a string (pointer to an array of characters).
-Sam
Thanks Sam.
But I tried this
and the return is :Code:printf("%c, %s, %c, %i\n", 133, "Ã*", 'Ã*' , 'Ã*');
???Code:Ã*, Ó, Ó, -32
i ran into a similiar problem and this is what I used.
and here is the outputCode:char a='Ã*'; int j=(int)a; int i=(int)a &0xFF; printf(" %c = %d not %d \n",a,i,j);
TroyCode:Ã* = 224 not -32
works fine
Thanks.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks