0

void main() = int main() return0 ?

19th Oct 2016, 2:27 AM
윤종호
윤종호 - avatar
2 Respuestas
0
Well, the answer is, this is the same for a small not important programs (just for learnig coding). But the large important programs would return value from main(). But not allways a formal 0 value, but sometimes another value. This is a decison of autor this program, how to plane, code, and describe in a program documentation and help. Comonly, return 0 means a program ended well, another value means some problems when program running..
19th Oct 2016, 5:19 AM
Petr Hatina
Petr Hatina - avatar
0
Some compiler will require that your main function return the value 0 to indicate that the program ran successfully.
19th Oct 2016, 5:41 AM
Yu Xiang Zhang
Yu Xiang Zhang - avatar