I'm writing a C program and using Dev C++ to compile/run it.
However, it's coming up with the error:
undefined reference to 'WinMain'" and "[Error] Id returned 1 exit status"
What do these errors mean, and how do I solve them?
The WinMain
error appears to be linked to line 18 of my code which is...
int read_char() { return getchar(); }
Any ideas? I'm a beginner with C, and I haven't found an answer to this question that I understand.
I presume it's because I'm using Windows. Would the code work on linux as it is perhaps?