Read carefully: void main() is legal if your compiler documents it as an option, and only because of a defect in the standard. Consequently, it is non-portable, because it is not required, though also not forbidden.Quote:
Originally Posted by transgalactic2
However, the difference between int main() and void main() is so minimal that there is really no reason to use void main() even when it is allowed, unless you are required to do so by some person in charge of your marks or your pay who you cannot convince otherwise. In that case, be pragmatic: use void main(), but know that you should not do so otherwise.