4 ms·
There is no return statement, although function is marked as `int`
by tandr 7y ago
There is no return statement, although function is marked as `int`
- colejohnson66 7y agoC and C++ explicitly permit this
- tandr 7y agoI remember problems compiling this in older C++, circa 2000. Maybe was just a compiler's "opinion"...
- colejohnson66 7y agoProbably just a buggy implementation. The C and C++ standards are explicit that `main` return an int and only an int. Never void. This has always been the case. However, the `main` function is the only function where the return statement can be omitted. If it is omitted, it’s an implicit `return 0`.