Garbled compiler (MinGW) output

c, c++, linked-list, mingw

Solution

I am wildly guessing here, but your compiler might be outputting error messages localized in your language using UTF-8, and your terminal does not understand UTF-8 and displays it in some Windows codepage. Are your language settings configured for a non-latin language?

Problem

I've been trying to compile some basic linked-list example i took somewhere else. The problem i am having is more of user kind. I guess the picture says it all: What's the reason for all the weird symbols ? Normal MinGW output should look something like error: invalid conversion from ‘void*’ to ‘element*’ That's the problem i am having, but i would be happy to receive explanation on the error itself. Here is my code: ``` #include <stdio.h> #include <stdlib.h> struct element { int info; struct element *next; }; int main(void){ struct element *head, *node; int arv; head = NULL; printf("Enter number! (0 to exit)"); scanf("%d",&arv); while (arv != 0){ node = malloc(sizeof *node); node->next = head; node->info = arv; head = node; printf("Enter number! (0 to exit)"); scanf("%d",&arv); } } ``` Edit Solved ! Thanks for the info guys. Similar question: mingw g++ gives warnings in wrong language (german instead of english) Non-localized version of MinGW? As for the solution, i removed everything from "\mingw\share\locale". Might not be the best practice though.

Original source

Related problems