C++ Logo

std-proposals

Advanced search

Re: [std-proposals] D3803R0 More standard forms of main

From: Paul Caprioli <paul_at_[hidden]>
Date: Tue, 22 Jul 2025 16:24:03 +0000
> The one interesting question in the proposal is whether "void main()" should be permitted. I would suggest it is better not to standardize "void main()". As you pointed out, it only adds complexity since "int main()" still has to be taught. Also, "void main()" is still magical, perhaps more so, because it returns EXIT_SUCCESS. Finally, it must be taught that it is unconventional and not supported by older compilers.

Received on 2025-07-22 16:24:06