Two files containing definition of main() Visual Studio?

前端 未结 2 1791

I have created a project in Visual Studio 2008 Professional Edition.

This project contains one .cpp file for each assignment like this...

[-]Source F         


        
2条回答
  •  太阳男子
    2021-01-12 07:32

    You can't have 2 functions called main() in a single project. What you should do is change the names of the functions, and then call them from a new main() function which would function as a menu.

    If you make them separate projects, you can switch which one to run with Solution Properties -> Startup Project.

提交回复
热议问题