I'm confused why this one works and the other one does not, aren't they both the same?
I'm confused why this one works and the other one does not, aren't they both the same?
Both Preludes and Laserlights posts are the same. Yours is every so slightly different in that you have the variables BETWEEN the () of main and the { that begins the statements INSIDE the function main - this is where, in the old (original) C style, you'd place the argument types - but you also had to declare those in the () of the function, so:
This would, technically, work, except that the function main is never called with three integer values as arguments. In C++ this would definitely be invalid, and it's on the "undefined" stage of C - so it may work on one system, and not work on another system.Code:int main(day, month, year) int day, month, year; { ...
It is definitely not the right way to do things.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.