简体   繁体   中英

How do you execute different C++ files within the same solution in microsoft visual studio 2013?

So I am trying to set up a project, I chose a console application and made it empty, so I add multiple files that just print out some text. I then compile and execute one file and it runs fine, but when I go to run a different one it runs the one that I just ran. I really don't know how to fix this so if you guys could help me that would be great.

Each console application can only have one main function that starts when the application is run. However, you can have multiple console applications per Visual Studio solution. If you right-click on a console application in the Solution Explorer you can click Set as StartUp Project so that it starts when you "run" your solution.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM