How do I call main() in my main cpp file from a seperate cpp file?

前端 未结 5 976
失恋的感觉
失恋的感觉 2021-01-29 14:33

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

5条回答
  •  情歌与酒
    2021-01-29 15:08

    you don't, change the return value of dispMessage to an int or similar, from the main you check the return code and do different actions based on that.

提交回复
热议问题