2
I would like a help, because when the user type his name with accent, when printing on the screen the name, appears disfigured.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <locale.h>
int main(){
setlocale(LC_ALL, "Portuguese");
char nome[50];
printf("Olá, seja bem-vindo ao Colega de Quarto, como você se chama ?");
setbuf(stdin, NULL);
fgets(nome,50,stdin);
printf("\n");
printf("O que você deseja, %s ?\n\n", nome);
return 0;
}
What encoding the file was created in and is being edited ?
– Isac