362
unsafeCode
(lemmy.ml)
Post funny things about programming here! (Or just rant about your favourite programming language.)
@stebo02 @Bogus5553 Neither of them require a return value, but
void mainisn't legal C++.void main(){...}is not in the standard, but works on both MSVC and GCC (with warnings). I think it works on both C/C++, but you really shouldn’t use it in production. Just useint main(void){...}, without any return value, which is permitted in the standard, and will return success iirc.