Why does void main() show an error? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why does void main() show an error?

On using void main() instead of int main() in a basic I/O programme​ it displays an error stating that main() should return int. But the same runs smoothly in TurboC++. Why?

7th Feb 2017, 5:37 PM
Rudradeep Deb
Rudradeep Deb - avatar
1 Answer
0
Maybe he has exception treatment. Confirm that you are programming in C ++ and not C...
7th Feb 2017, 8:43 PM
Jônatas Araripe
Jônatas Araripe - avatar