File won't compile in MS Visual Studio, but will in GCC. Why?
问题 I wrote such sample code: #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <errno.h> char* print_errno_msg(int value); int main(void){ struct stat buffer; int status; status = stat("./main.c", &buffer); char *msg = print_errno_msg(errno); /* syntax error : missing ';' before 'type' */ printf("status = %i; errno = %i; %s\n", status, errno, msg); /* 'msg' : undeclared identifier */ errno = 0; int ch = getchar(); /* syntax error : missing ';' before