Your First Project
Please follow these steps in order. Click on a step to see a
picture of me doing it on the right.
Preparing the Project
-
Open Dev-C++, if it isn't already open.
-
Click on File -> New -> Project....
-
Enter "My First Project" as your project title.
-
Make this a C++ project, and check Set Default Language.
-
Double-click on Console Application. This not only sets your project
type, but closes this window as well.
Saving the Project
You should now see a Save Project window. You now need to find a place to
store your project file, which is where Dev-C++ stores information about your
C++ project. Save your
project in a clean, new folder, because that folder will get cluttered up with all
of your other C++ files. Here's what I recommend:
-
Go to your hard drive root directory (mine is C:\).
-
Create a new folder called ProgCode.
-
Double-click on the new folder, then create another new folder
inside. Name it My First Project.
-
Double-click on the folder you just created. Click Save to
save your project file there.
Compiling the Project
You now have a file called main.cpp open, with some C++ in it. DON'T
MODIFY THE CODE, that's for later! Instead, you'll be compiling what's already
there, as such:
-
Save main.cpp by clicking on the yellow disk. If you want to save all
files, click the icon with multiple yellow disks.
Note: your files will be saved automatically before you compile.
-
Click Save. You don't need to change anything.
-
Now, click the Compile button (click for picture).
-
You should see a Compile Progress window. It should go
through 2 stages (compiling and linking), and then say Done.
-
Close the window.
-
Run your project by clicking the Run button (click for picture).
-
You should see a console that says Press any key to continue . . ..
Just press a key.
Congrats! You're done -- with this part. Close this window, but keep Dev-C++ open.
You get to change code soon...