I'm trying to write and run "Hello World" in C.
int main(int argc, char *argv[])
{
#include <stdio.h>
puts("Hello world.");
return 0;
}
However, I keep getting the following error in the Terminal:
In file included from ex.c:3:
/usr/include/stdio.h:353:54: error: function definition is not allowed here
__header_always_inline int __sputc(int _c, FILE *_p) {
^
1 error generated.
It appears to me it's picking up a syntax error in the stdio header file? I don't understand what's happening.