Void or int func | SoloLearn: Learn to code for FREE!

0

Void or int func

Do we can use void main() ?

12/15/2017 4:30:16 PM

MRDiviner

3 Answers

New Answer

+11

void main() is not standard and we usually see it with turbo c++. because it's not standard, it wont work with standard compilers like the one SoloLearn uses. it's best to use int main.

+7

To add to Jamie's fantastic answer, here is the thoughts of the author of the language on void main: http://www.stroustrup.com/bs_faq2.html#void-main

+1

thanks