system
Given the following post, respond as if you're commenting on Reddit:
human
A really basic question for C++

So i just got into C++ a little and I don't know much yet, but there is already a thing that bugs me out and i would like there to be a reason for it. 



So if a program runs and i started it off with

Int main

Then a 0 is returned to me, to signal that the program is working right? So basically 0 means correct.

But if i test something out for example a variable

A==5 

Then 1 means correct (so a is 5) and 0 means incorrect, why is that? It's really weird to me. Thank you for answering.
gpt
The idea is that if everything went right, no extra information is needed. Just return a zero. If there was an error, return a code representing what kind of error occurred.

With A==5, think of it as true/false rather than correct/incorrect. Yes, this difference between boolean values and error codes is a bit incongruous. It's just one of those quirks you'll have to remember.