0
#pragma hdrstop
#pragma argsused
#include <stdio.h>
#include <locale.h>
#ifdef _WIN32
#include <tchar.h>
#else
typedef char _TCHAR;
#define _tmain main
#endif
int _tmain(int argc, _TCHAR* argv[])
{
setlocale(LC_ALL, "portuguese");
0
#pragma hdrstop
#pragma argsused
#include <stdio.h>
#include <locale.h>
#ifdef _WIN32
#include <tchar.h>
#else
typedef char _TCHAR;
#define _tmain main
#endif
int _tmain(int argc, _TCHAR* argv[])
{
setlocale(LC_ALL, "portuguese");
Browser other questions tagged c++
You are not signed in. Login or sign up in order to post.
Possible duplicate of Why in the C++ debug accented words and c cedilla appearing uncompromised?
– Guilherme Nascimento
For this case, there is no duplicity in questioning. Because I am using Embarcadero’s IDE RAD Studio C++ Builder.
– Eduardo Silva
The problem is the same,
setlocale
will not work anywhere for the same problems mentioned in the answer to the other question. The question is not RAD the question is Windows. Unless you’re talking about a very different error, but since there are no details in the question then I assume the error is the strange characters like this:Utilizando caracteres e acentuação da lÃngua portuguesa!
if is not for character problem then edit your question and explain.– Guilherme Nascimento
I think the problem is in RAD itself, because in I use Codeblocks, and in it this command works.
– Eduardo Silva
Codeblocks is not compiler is IDE, the compiler in it must be Mingw, I have Mingw here and the problem also occurred, your mingw must have seemed to work due to some Codeblocks preconfiguration
– Guilherme Nascimento
Yes, in Codeblocks I use Mingw too, I started using RAD these days, and in it this command does not work. All the material I find is in Russian, Mandarin or some language I don’t know.
– Eduardo Silva
As I said, your codeblocks should have a preconfiguration for the terminal to display the accented output, because here I compile things in hand without IDE and the problem also occurred.
– Guilherme Nascimento