Int? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Int?

can we use void instead of int?

4th Nov 2016, 6:47 PM
Pavankumar A N
Pavankumar A N - avatar
1 Answer
+ 2
For functions, yeah of course you can. Don't do it for main, just keep it as int as it follows the C++ standard, and return values from main help to diagnose problems with our programs if they are run from an external source.
4th Nov 2016, 7:24 PM
Cohen Creber
Cohen Creber - avatar