how to run an individual cpp file in a project?

hi,

  how to compile and run an individual cpp file in a project, in which there are other cpp files containing main(). the "debug->start (without) debugging" option seems used to run the whole project.

  Thanks

  Yu



Answer this question

how to run an individual cpp file in a project?

  • sj2509

    It's a bit unusual to compile and run individual files but you may be able to achieve something like that by using configurations. You can create a custom configuration based on the default configurations (Debug/Release) (see Build menu, Configuration Manager) and then you can exclude files from build on a configuration basis. To exclude a file from build right click the file in solution explorer, chose propertie and in the properties windows, general properties you have the "Excluded from build" option.
  • how to run an individual cpp file in a project?