this post was submitted on 11 Feb 2025
257 points (95.4% liked)

Programmer Humor

33315 readers
880 users here now

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

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] lily33@lemm.ee 33 points 18 hours ago* (last edited 17 hours ago) (1 children)

That is why I use just int main(){...} without arguments instead.

[–] Bogus5553@lemm.ee 23 points 17 hours ago* (last edited 17 hours ago) (3 children)

Any void main(){...} enjoyers?

[–] CausticFlames@sopuli.xyz 1 points 5 hours ago

int main(void) { . . . } for me!

[–] stebo02@lemmy.dbzer0.com 4 points 10 hours ago (2 children)

besides not requiring a return value, what difference does it make?

[–] barubary@infosec.exchange 4 points 10 hours ago (1 children)

@stebo02 @Bogus5553 Neither of them require a return value, but void main isn't legal C++.

[–] stebo02@lemmy.dbzer0.com 1 points 9 hours ago

yeah I thought so, does it work in C?

[–] Buddahriffic@lemmy.world 2 points 9 hours ago

It will also give an error if you try to add a return value anyways.

[–] Thorry84@feddit.nl 2 points 13 hours ago

while (true) {...}