Reputation: 301
I have Microsoft Visual Studio 2010 for C++. I can compile files that are created when the project is created. However, when I do File > New > New File, I can't compile the new file. There is no option. Am I doing anything wrong?
Thanks
Upvotes: 1
Views: 105
Reputation: 20093
You need to add the file to your project before you can compile it. Right click on the project and select "Add" from the context menu then "Existing Item" for files you have already created and "New Item" to create new files and automatically add them to your project.
Alternatively you can open the "Project" menu and select either "Add New Item" or "Add Existing Item".
Upvotes: 2