Getting Start with Visual .NET for C++ programming in COSC120
Start up the .NET application and here is the screen you will see. (Don’t worry if yours looks slightly different from this.)
Click File->New and select Project (as shown in the following screen shot),
You will get a screen similar as the following:
In the above screen, erase <Enter name> and type in your own project name instead. For example, the following screen shows the project being created is called Lab1 and click OK button.
You will be given the following window. Click “Application Settings” in the window:
You will see the following window. Make sure that you set the application type to be “Console application” and Additional options to be “Empty project”.
Then click “Finish”, you will see the following window. In project explorer, you can see project “Lab1” has been created. Click the “+” in front of the folder icons but nothing there. This project is empty.
To add files to the project, Click Project->Add Existing Item as following:
You will be given a widow like this:
Click the dropdown arrow to choose a folder you want to search for a file. In the following example, we choose a file under P:\COSC120\Lab1
Files under the selected folder are displayed in the following window. Click the filename you would like to add (for example, firstprog.cpp) and click “Open” button,
You are back to this window. Now try to expand the folders on the left to see what happens.
You will find that the Source Files folder now contains file “firstprog.cpp”. Now double click the file name and the content of the file now being displayed in the right window. See the following screen shot.
Now we will build the project by clicking Debug->Build Lab1. You will notice that some information is being display in the result window. That is where you will find error message reported by compiler and linker.
After the project is successfully compiled and linked, you can run the project by clicking Debug->Start Without Debugger.
The program displays message in the Console window. Press Enter key toclose the Console window and take you back to your IDE.
To generate a screen shot like above, follow the following steps:
- press Shift+Print Screen and then press Ctrl+s,
- open a word document
- press Ctrl+v
the screen shot should be pasted in the word document.
1