0

how many main() function in program can be written in program?

main()

18th Aug 2016, 1:27 PM
loke wei lun
loke wei lun - avatar
2 Answers
+ 3
I imagine due to the scoping operator existing you could have one for every class. That said, it would be quite odd to have more than the starting point called main.
18th Aug 2016, 1:47 PM
Ahkrin
+ 3
You can only use one main function in a class as it is the starting point of program execution.
18th Aug 2016, 7:07 PM
Shubham
Shubham - avatar