Stamau123@lemmy.world to 196@lemmy.blahaj.zone · 18 hours agoDeltarulelemmy.worldimagemessage-square12fedilinkarrow-up1123arrow-down12
arrow-up1121arrow-down1imageDeltarulelemmy.worldStamau123@lemmy.world to 196@lemmy.blahaj.zone · 18 hours agomessage-square12fedilink
minus-squareProgrammer Belch@lemmy.dbzer0.comlinkfedilinkEnglisharrow-up2·4 hours agoI didn’t need to do this but I did and now I want it in my comment history: class Suckable { bool unsucked; public: Suckable () { unsucked = true; } void Suck() { unsucked = false; } void CheckAndSuck() { if (unsucked) { Suck(); } } }; Sorry for making you see c++, it’s the language I’m currently using. This program compiles on my machine and doesn’t use global variables.
I didn’t need to do this but I did and now I want it in my comment history:
class Suckable { bool unsucked; public: Suckable () { unsucked = true; } void Suck() { unsucked = false; } void CheckAndSuck() { if (unsucked) { Suck(); } } };
Sorry for making you see c++, it’s the language I’m currently using. This program compiles on my machine and doesn’t use global variables.