CIS170C All Assignments CIS170C All Assignments | Page 3
7. Additional options: Check mark “Empty project”.
8. Click Finish. Your project is now created.
Step 2: How to Add a Source Code File to Your Project (.cpp file)
1.
In the Solution Explorer, right-click on the “Source Files” folder and select "Add" and
then "New Item."
2.
In the next dialog box, choose C++ file (.cpp), enter a name for your source code file, and
press the Add button.
3.
Type or copy and paste your code into the newly created source code file. Build the file
by pressing F7, and then execute your program by pressing CTRL-F5 (start without debugging)
or use the F5 key (Start Debugging).
Step 3: Create a Source Code File
Now enter the following C++ program exactly as you see it. Use the tab where appropriate.
[Note: C++ is case sensitive.] Instead of John Doe, type your name.
When you execute a program in debug mode (F5), the console screen may appear and
disappear
before you have an opportunity to view your output. There are several techniques you can use
to
pause the console screen so you can read the output. On the very last line in the main()
function:
a. insert the statement: system("pause");
-OR-