362
unsafeCode (lemmy.ml)
submitted 5 months ago by PandaDEV@lemmy.ml to c/programmerhumor@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] Bogus5553@lemm.ee 4 points 5 months ago* (last edited 5 months 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.

this post was submitted on 11 Feb 2025
362 points (100.0% liked)

Programmer Humor

37530 readers
191 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 6 years ago
MODERATORS