Hallo everyone,
I've been studying C++ active for a couple of days. And I was thinking about that all my codes and with:
{
return 0;
}
So I wanted to know why and in my book I found:
The only statement in this block is a return, which is a statement that terminates a function. As is the case here, a return can also send a value back to the function’s caller. When a return statement includes a value, the value returned must have a type that is compatible with the return type of the function. In this case, the return type of main is int and the return value is 0, which is an int.
But I don't really understand this, for me it's a difficult explained. Like what is a function in C++ programming, a function's caller...?
Can someone explain it in an easier way?
Thank you for your help and time
Kareem