0
hello pals.. i keep getting the error 'int main' not redefined. please what am i getting wrong?
4 odpowiedzi
+ 4
You probably have two "int main()"s. Note that only one can be in any program. 😉
+ 3
Please post your code, we can understand much better like that.
+ 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
0
i appreciate your responses.. thank you ☺