Getting started: Windows

1. Search "dev c++" in your web browser. This is the text edit and compiling software that these intructions will get you started on. Select the link to surgeforce.net as shown, the download will begin automatically.

Step 1

2. Once the download is complete, run the installation program. Most likely your computer will ask if you want to open this application from the internet, then you will see the beginning of the installation process, shown below:

Step 3

3. To go through the installation program, you will want to choose all the defaults. These steps should resemble if not exactly match the following: "I agree" on the license agreement, "Next", "Install", "Yes, I want to install", "Finish", "Next", "Next", "Next", "Ok".

Step 4

4. After selecting "Ok", close out of the window offering tips, then select File->New->Source File This will create a new .cpp file which will be where you will type your code for your assignment.

Step 5

5. After creating a file, it is ideal to save it before doing anything else by selecting File->Save As. Then select a destination for your file. Typically it is beneficial to create a folder on your desktop or somewhere else very easily accessed to store all of the assignments for this class in one place. Likewise, you may want to name your file with the same name given to the assignment on canvas so that it will be easy to go back and find if you need to reference what you coded. In this case, the example file is simply named demo.cpp and is being saved directly to the desktop.

Step 7

6. Copy and paste the sample code from the Hello World assignment on Canvas, then save the file again. (You should be able to use control-s to re-save the file since you already chose a destination folder.)

Step 8

7. Next open Command Prompt from the list of programs that come on your computer under "Start". You should be able to search for this application by typing "cmd" into the search bar. With this app you will be able to test your code locally rather than having to submit the assignment to find out if it works.

Step 9

8.In Command Prompt, type "cd" to change the directory, i.e. the folder, that your computer will look in for the file you just saved. In this example, demo.cpp is saved on the Desktop. If it were saved in a folder called P1 located on the desktop, for example, you would need to instead use the command "cd Desktop/P1" to move to the folder where your file is actually saved. Basically, change the directory to match the path to the folder where your file is located. (Note that folder names must not have spaces in order to be read properly by Terminal and may be case-sensitve.)

9.Once in the proper folder, use the command g++ followed by the filename.cpp, in this case: demo.cpp. Then on the same line, enter "-o demo.exe" to tell the computer to convert your .cpp file into an executable file. If your code compiles and creates this executable file without any errors, the command line prompt should pop up again on the next line, as shown. Then enter "demo.exe" to tell the computer to run the .exe file so that you will be able to see if your code did what you intended it to do: in this case, output "Hello, World!".

Step 10

Note: If you would prefer to use another compiler or text editor that you are already familar with, that is acceptable. This is meant to be a guide to those who are looking for how to get started.

Note: If an error is returned when attempting to run the g++ command, you may need to update the PATH variable. To update the PATH variable, search Windows for Advanced System Settings. This will bring up the System Properties window. Press the Environment Variables button, which will bring up the Environment Variables window. There will be two Edit buttons. Press the top Edit button, which will bring up a dialog window. You will need to enter the path to g++. An example location would be "C:\Program Files (x86)\Dev-Cpp\MinGW64\bin" minus the quotes You will need to reboot your computer, then the above should work