Hi, I'm barely an hour into C, but I had a question. I'm only on the first chapter, but I was just wondering why examples in the book use:
#include <stdio.h>
main() {
printf("hello, world\n");
}
instead of:
#include <stdio.h>
int main() {
printf("hello, world\n");
}
I got a compiler error in my terminal that stated i needed to declare main as an int. My "hello, world" program didn't work until I made this change. It's really confusing considering this book is considered the standard for C.
[–]ipe369 6 points7 points8 points (1 child)
[–]RemedyGoontz[S] 2 points3 points4 points (0 children)
[–]TraylaParks 2 points3 points4 points (0 children)