Gabriel Marinello wrote:
I am Latinanmerican an I would like to knonw how make accents using
printlf. Thanks.
The "portable" (C++/C99-specified but not widely implemented in C
compilers) way is to specify the Unicode code points.
printf("%s\n", "\u00E1\u00E8\u 00EF");
The more widely implemented way is to type accented characters directly
in the source code, but this will rely on your locale during
compilation matching that during editing.
printf("%s\n", "áèï");
In both cases, you can make it a bit more likely to work properly by
first calling the setlocale function, and then using a wide string for
printf:
printf("%ls %ls\n", L"\u00E1\u00E8\ u00EF", L"áèï");
Of course, there are systems that simply do not support accented
characters. If you're dealing with such a system, neither way will
work, for obvious reasons.