I bought some old C books and I am finding that many of the examples would throw compile errors.
This prototype used is what got me messed up:
I found how to fix it (with the help of some excellent compiler messages) but I am surprised so many books got it wrong.
Was this ever an acceptable code prototype?
Messed up that "C-Programming for Dummies" can't get it right.
This prototype used is what got me messed up:
Code:
#include<stdio.h>
void main()
{
printf("Goodbye, cruel world\n");
}
Was this ever an acceptable code prototype?
Messed up that "C-Programming for Dummies" can't get it right.
Code:
#include<stdio.h>
int main(void)
{
printf("Goodbye, cruel world\n");
return 0;
}