Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 19 Online
OpenStudy (anonymous):

what do u mean by void main() in c++ and what is its function???

OpenStudy (anonymous):

It means that the function is main which indicates that the program runs whatever is in main function, but if you use void main, it means that you do not need to return anything to main for void is not a return type.

OpenStudy (anonymous):

kk..but can you please explain it more briefly?

OpenStudy (e.mccormick):

Well, it is not a valid type if you follow the standards. See, the main returns errors to the operating system on failures. If you use a void type you break this aspect of the program.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!