in both c and c++ 0 can either mean success and failure.
for a lot of functions, 0 means success, and any other number specifies the type of error that has occured.
other functions might return a boolean (so 1 - success, 0 - failure)
sometimes functions need to return some meaningful value, and if it can only be positive (such as size), they can use negative nulbers for error codes. but also sometimes its not possible to return negative numbers at all.
c++ can also throw exceptions, or return std::optional or std::except. or whatever depending on the codebase
IIRC the Garden Warfare cactus is female but idk about the cacti in the tower defense games… ok just checked the Suburban Almanac in the PVZ1 app, the Cactus is also female there.
Reposting your own one with 0 upvotes or anything?
yea
Understandable, it's pretty good
thx dawg
my party's representative when, after losing at presidential elections with 0% of total votes, i post my candidature again
Ok but like returning 0 is the main definition of success
oh shit did i get them mixed up
https://www.geeksforgeeks.org/cpp/return-0-vs-return-1-in-c/
i meant binary
https://preview.redd.it/w2mg8ri5d46g1.png?width=334&format=png&auto=webp&s=4ba1e85d7ad934f0e0ad9f033af4b3c9e17e87bd
also why does c++ do it like that
c++ doesn't do it like that
in both c and c++ 0 can either mean success and failure.
for a lot of functions, 0 means success, and any other number specifies the type of error that has occured.
other functions might return a boolean (so 1 - success, 0 - failure)
sometimes functions need to return some meaningful value, and if it can only be positive (such as size), they can use negative nulbers for error codes. but also sometimes its not possible to return negative numbers at all.
c++ can also throw exceptions, or return std::optional or std::except. or whatever depending on the codebase
Also when returning pointers 0 (or NULL) is the return for errors
Hey, C++ has a nullptr_t type specifically for this
In my unprofessional opinion, returning a number error code without wrapping it or throwing an error or anything is cringe
for c++, yes. for c, theres no other option really
0 bits are perfectly valid. Also who argues about the gender of a cactus from a phone game shits weird
Also, i would imagine gender and sex for plants would be way beyond what we are accustomed to
https://en.wikipedia.org/wiki/Schizophyllum_commune#Mating
That's not a plant. They specifically asked for plants.
Right, sorry
https://en.wikipedia.org/wiki/Plant_reproductive_morphology
The funny thing about this tread is that cactus is canonically a woman and the guy just didnt want to accept it
I've been there, this guy is weird
IIRC the Garden Warfare cactus is female but idk about the cacti in the tower defense games… ok just checked the Suburban Almanac in the PVZ1 app, the Cactus is also female there.
What was the discussion about?
like literally just read the sticker book or HEAR HER VOICE FROM BFN OMFG