• 1 Post
  • 5 Comments
Joined 2 years ago
cake
Cake day: June 15th, 2023

help-circle

  • Bogus5553@lemm.eetoProgrammer Humor@lemmy.mlunsafeCode
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    2 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.