• Bogus5553@lemm.ee
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    8 hours ago

    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.