I am trying to use XCode as my training environment for simple C++ programs. If I create a new project, I can successfully complete everything (compile, run) but If I add one more file, it can't compile as a separate one. That means that I need to have a main2() and a main3() etc. because having 2 files with two main() in the same folder lead to an error.
In simple words, I want to write code for 30 C++ examples, each one in its own .cpp file and compile every one of them separately and not as a whole project (all files together that If there are two functions of the same name, it will crash).
Aucun commentaire:
Enregistrer un commentaire