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 use int main(void){...}
, without any return value, which is permitted in the standard, and will return success iirc.
I personally think that C++ can be beautiful. For example:
std::filesystem::path
overrides the/
operator, for specifying parent paths. It’s the same as Kotlin’s OKIO and Pythons standard pathlib.