0

What does return mean?

17th Dec 2017, 6:35 AM
Mikku27#
Mikku27# - avatar
2 odpowiedzi
+ 2
I am not sure if its just a bug, but i am seeing that somebody already answered this. But anyway i will post this code, and you will see what is return doing. #include <iostream> using namespace std; int something_else(){ cout << "Something else" << endl; return 0; } int something () { cout << "This is the second function, which was called by return something() "<< endl; return something_else(); } int main() { cout << "This is main function" << endl; return something(); }
17th Dec 2017, 7:06 AM
Ice
Ice - avatar
+ 4
return is used to return any value.. in case of int datatype mostly we are using return 0
17th Dec 2017, 7:17 AM
Ashutosh Saraf
Ashutosh Saraf - avatar