0

hello pals.. i keep getting the error 'int main' not redefined. please what am i getting wrong?

https://code.sololearn.com/cTBz809KQgP2/?ref=app

29th Dec 2017, 9:09 AM
Bambor Hector Joe
Bambor Hector Joe - avatar
4 odpowiedzi
+ 4
You probably have two "int main()"s. Note that only one can be in any program. 😉
29th Dec 2017, 9:12 AM
blackcat1111
blackcat1111 - avatar
+ 3
Please post your code, we can understand much better like that.
29th Dec 2017, 9:14 AM
Akash Pal
Akash Pal - avatar
+ 3
main functions is entry point of any program and two entry point is not possible so global main function(main function outside all classes) cannot in overloaded in c++, But if you write main function inside a class then it will compile fine however it will not be treated as program entry point  https://stackoverflow.com/questions/5282151/can-we-overload-main-function-in-c https://code.sololearn.com/c0fjFTd4SMb9/?ref=app
29th Dec 2017, 9:44 AM
GAWEN STEASY
GAWEN STEASY - avatar
0
i appreciate your responses.. thank you ☺
29th Dec 2017, 10:15 AM
Bambor Hector Joe
Bambor Hector Joe - avatar