cm0002@lemmy.world to Programmer Humor@programming.dev · 3 months agounsafeCodelemmy.mlimagemessage-square13linkfedilinkarrow-up1245arrow-down113cross-posted to: programmerhumor@lemmy.ml
arrow-up1232arrow-down1imageunsafeCodelemmy.mlcm0002@lemmy.world to Programmer Humor@programming.dev · 3 months agomessage-square13linkfedilinkcross-posted to: programmerhumor@lemmy.ml
minus-squareKwdg@discuss.tchncs.delinkfedilinkarrow-up27arrow-down1·3 months agoNot needed, main in C++ implicitly returns 0 if there is no return
minus-squareLucy :3linkfedilinkarrow-up9arrow-down9·3 months agoShould ≠ Needs to You can do it, and it will work, but it’s unclean and not best-practice. I wouldn’t be surprised if it’s undefined behaviour.
minus-squarexmunk@sh.itjust.workslinkfedilinkarrow-up22·3 months agoJust to clarify. It is defined behavior - there’s plenty of undefined behavior in C but that ain’t one of them.
minus-squareesa@discuss.tchncs.delinkfedilinkarrow-up23arrow-down2·3 months ago>What is C++? A miserable huge pile of "should"s
minus-squareriodoro1@lemmy.worldlinkfedilinkarrow-up2arrow-down1·3 months agoshould have a space after „>” and two new lines after „?”. I guess markdown is miserable as well.
minus-squarekboy101222@sh.itjust.workslinkfedilinkEnglisharrow-up5·3 months agoHey now, markdown serves it’s purpose. It’s not great, but as a web dev, I don’t want people expecting full WYSIWYG editors in every website cause fuck that!
minus-squareColonel Panic@programming.devlinkfedilinkarrow-up3·3 months agonot being able to master markdown might hint at why the commenter is struggling with C++
minus-squareLucy :3linkfedilinkarrow-up1·edit-23 months agoStill love it tho. You can make it whatever you want!
Should return 0;.
Not needed, main in C++ implicitly returns 0 if there is no return
Should ≠ Needs to
You can do it, and it will work, but it’s unclean and not best-practice. I wouldn’t be surprised if it’s undefined behaviour.
Just to clarify. It is defined behavior - there’s plenty of undefined behavior in C but that ain’t one of them.
>What is C++? A miserable huge pile of "should"s
Love me some Castlevania++
should have a space after „>” and two new lines after „?”.
I guess markdown is miserable as well.
Hey now, markdown serves it’s purpose. It’s not great, but as a web dev, I don’t want people expecting full WYSIWYG editors in every website cause fuck that!
not being able to master markdown might hint at why the commenter is struggling with C++
Still love it tho. You can make it whatever you want!