@[email protected] to Programmer [email protected] • 15 hours agounsafeCodelemmy.mlimagemessage-square13fedilinkarrow-up1248arrow-down112 cross-posted to: [email protected]
arrow-up1236arrow-down1imageunsafeCodelemmy.ml@[email protected] to Programmer [email protected] • 15 hours agomessage-square13fedilink cross-posted to: [email protected]
minus-square@[email protected]linkfedilink31•edit-214 hours agoThat is why I use just int main(){...} without arguments instead.
minus-squarestebolinkfedilink4•7 hours agobesides not requiring a return value, what difference does it make?
minus-square@Buddahrifficlink2•6 hours agoIt will also give an error if you try to add a return value anyways.
minus-squareFüsilier Breitlingerlinkfedilink2•6 hours ago@stebo02 @Bogus5553 Neither of them require a return value, but void main isn’t legal C++.
That is why I use just
int main(){...}
without arguments instead.Any
void main(){...}
enjoyers?int main(void) { . . . }
for me!besides not requiring a return value, what difference does it make?
It will also give an error if you try to add a return value anyways.
@stebo02 @Bogus5553 Neither of them require a return value, but
void main
isn’t legal C++.yeah I thought so, does it work in C?
while (true) {...}