I have a sample directory of some software, which contains multiple files with multiple main
functions. May I assemble all of these files into single project, compile them and then run specific ones without getting main already defined
error? Suppose I don't want to create separate project for each cpp file.
UPDATE
I need simple one-two-click solution (if it exists). I don't want to distribute files among folders or refactor files content. For example in Eclipse/Java you can right-click any file with main and run it. And there can be many of main files in one project. Is this possible for VisualStudio/CPP?
UPDATE 2
I know that C++ is not Java and that Visual Studio is not Eclipse. My question is about automation of some manual operations.
See Question&Answers more detail:os