consider this code:
anyway, my mate has a very old borland compiler I think its 2.2 or somthing, and he compiles that and it works fine.Code:#include<iostream.h> using namspace std; void main() { cout << "Look at me I am a pig!" << endl; return; }
but i was told if you voided main, the compiler would have a fit at you, and tell you that main must return an int.
It will not work on my compiler or others, but why was it accepted on that compiler?



LinkBack URL
About LinkBacks


