3 ms·
Everyone can be cool with void main(void) nowadays in C. https://en.cppreference.com/w/c/language/main_function https://en.cppreference.com/w/c/language/main_f
by Someone 3y ago
Everyone can be cool with void main(void) nowadays in C.
https://en.cppreference.com/w/c/language/main_function https://en.cppreference.com/w/c/language/main_function:
“Every C program coded to run in a hosted execution environment contains the definition (not the prototype) of a function named main, which is the designated start of the program.
int main (void) { body } (1)
int main (int argc, char *argv[]) { body } (2)
/* another implementation-defined signature */ (since C99.) (3)
”
(C++ is a bit more strict. There, main must return an int)