Compile C Error in Gcc - Accentuation

Asked

Viewed 386 times

0

Compiling the C code in GCC, and then running it.

An accentuation error occurs:

PROGRAM:

#include <stdio.h>

int main() {
  printf ("Bem Vindo ao Nosso Jogo de Adivinhação");
}

Command Terminal:

gcc adivinhacao.c -o adivinhacao.exe
adivinhacao.exe: 
Bem Vindo ao Nosso Jogo de Adivinhação
  • 3

    Include this library in your & #Xa; #include <locale code. h> http://linguagemc.com.br/localizacao-de-programas-com-locale-h/ &#Xa!

  • 1

    First you have to know in which charset your text editor is saving the program file, and second which terminal charset you are running on. You both have to knock.

1 answer

-1

Windows? On my machine ran normally with the accents.

$ cat prog.c 
#include <stdio.h>

int main() {
  printf ("Bem Vindo ao Nosso Jogo de Adivinhação");
}
$ gcc prog.c -o prog
$ ./prog
Bem Vindo ao Nosso Jogo de Adivinhação

My version of gcc: gcc version 6.3.1 20161221 (Red Hat 6.3.1-1) (GCC)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.