Search code examples
c++netbeansprogram-entry-point

Changing the main file in a C++ netbeans project


When I create a new C++ project in netbeans,it prompts me to choose a name for the main file of the project

this is the file that gets executed when I press "Run" in the IDE

does anybody know how to change this file to another one AFTER I've already created the project?


Solution

  • You don't need to change the name or point to a different file.

    In C++, on NetBeans or any other IDE, just place main function on a different file (the file you want to RUN when you press RUN on the IDE) and you should be done.