Two files containing definition of main() Visual Studio?

前端 未结 2 1793

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:21

    I guess in your situation your project consists of just one file. If you want to compile them separately then I suggest:

    • create individual project (CSPROJ) file per each of them
    • use command line compiler CSC to compile these files separately
    • or (as suggested) rename your current Main methods to Run methods, create a separate file named Program.cs with just the Main method and from this method call to a particular Run method (depending on which task you want to execute)

提交回复
热议问题