0. Translate algorithm into C++
- Open Microsoft Visual Studio
- Click on the desktop icon
OR Click Start menu and find
- New Project / Visual C++ / Win32 Console Application
- Enter Name for Project (helloWorld)
- Note location
- Check 'create directory for solution'
- Wizard: Click Application Settings
- Check 'empty project' ***!!!
- Finish
- Project/ Add New Item
- Code
- C++ File
- Enter Name for file (main.cpp)
- Enter Code!
// Hello World Program
#include <iostream>
using namespace std;
int main()
{
cout << "Hello World!" << endl;
return 0;
}
- Build / Build helloWorld compiles the program
- If no syntax errors, message on status bar "Build Succeeded"
- 'Error List' window opens at bottom if there are syntax errors
- Executing your newly compiled code:
- Ctrl-F5 runs the code NODEBUG (to add button: 'Tools/Customize')
- Debug / Start Debugging - executes the code
- Check now for LOGIC ERRORS