Shady_Shiroe@lemmy.world to Programmer Humor@lemmy.ml · 2 years agoWar Crimeslemmy.worldimagemessage-square37fedilinkarrow-up1768arrow-down123
arrow-up1745arrow-down1imageWar Crimeslemmy.worldShady_Shiroe@lemmy.world to Programmer Humor@lemmy.ml · 2 years agomessage-square37fedilink
minus-squareNeon@kbin.sociallinkfedilinkarrow-up3·edit-22 years agoi’m not used to c++ but… int main() ?
minus-squareexoplanetary@lemmy.worldlinkfedilinkarrow-up13·2 years agoYep, main returns an int in C++. It’s for the return code - if it returns 0, that indicates the program ran ok, if it returns anything else some sort of error occurred.
minus-squareNeon@kbin.sociallinkfedilinkarrow-up3·2 years agothat actually makes sense. thanks for that explanation.
i’m not used to c++ but…
int main()
?Yep, main returns an int in C++. It’s for the return code - if it returns 0, that indicates the program ran ok, if it returns anything else some sort of error occurred.
that actually makes sense. thanks for that explanation.