I've seen this coding convention in certain books and i was wondering. Even if it does work correctly isn't kinda wrongif main returns an integer value to the processor to let it know it has compiled succesful, why then do you need void just to say that it does not accept any arguments? doesn't the compiler/processor knows this by default.Code:int main(void) ....... ....... ..... return 0;
while i'm at it:
if "0" is supposed to say it is compiled succesfully and any other integer can be any type of error. why use that convention seeing as how in C if !0 is seen as true. basically as long as its not zero it is true/fine. seems counter intutive to me and confusing. Its used to represent one thing and then it turns around and is used to represent another.
I know I'm a newbie so take it easy on me with your responses.