0

Whats wrong with void return type function for creating a main function

9th Apr 2017, 8:35 AM
Mohd Thanveer Mk
Mohd Thanveer Mk - avatar
2 Answers
+ 9
The syntax is wrong. In C++, main function strictly returns int data type.
9th Apr 2017, 8:47 AM
Hatsy Rei
Hatsy Rei - avatar
+ 7
Some compilers accept void main() but it's not ANSI standard...
9th Apr 2017, 8:52 AM
Karl T.
Karl T. - avatar