+ 1
Can't we use void main
Instead of using int main() why can't we use void main() what is the difference
5 Réponses
+ 2
u can but then u must write one more command at the end that is." getch()"
at least in dosbox it is so..I don't know about this app .. I will test this..👍👍
+ 1
You can use void as the return type of the main method.
+ 1
using void main() means that the main function won't return any value. Using int main() means that the main function will return an integer. Depending on what you aim to do in main () function chose wisely.
0
Didn't get it
0
yes you can but not on sololearn app