I\'m making a class that displays a message to the user and asks them if they want to return to the start of the program, but the message function is in a separate class from wh
In C++ it is illegal for a program to call main
itself, so the simple answer is you don't. You need to refactor your code, the simplest transformation is to write a loop in main
, but other alternatives could include factoring the logic out of main
into a different function that is declared in a header and that you can call.