با سلام
اين هم معرفي يیک کامپایلر خوب برای ++C كه توضيحات به زبان انگلسي روان هست كه روال نصب و كار با اين نرم افزار رو توضيح داده.
DevC++ For Windows
What is DevC++
DevC++ is a full-featured integrated development environment (IDE) that uses the MinGW version of C++. An IDE is a program that allows you to edit, compile, and debug your C++ programs without using the command-line. For those of you who prefer to use your own editor.
DevC++ comes with everything you need to compile and link both console-mode and GUI programs that will run on Windows 95/98/NT/2K/XP; your programs will not run on Windows 3.1 or on plain DOS machines however. You don't need to download and install anything else.
The rest of this page will walk you through the steps necessary to download, install, and run your C++ programs using DevC++ and the included version of the MinGW C++ compiler.
Step 1: Download DevC++
دانلود این برنامه (حجم دانلود ۱۲ مگابایت ) :
DSave the file in a download or temporary directory on your local machine. (Be sure to remember where you put it!).
http://pnu-club.com/imported/2010/06/61.gif
The downloaded file is about 12.5 MB; on a DSL connection it takes under 5 minutes to download. On a dial-up connection, though, downloading may take a while. In that case, you may want to copy the installation files from the Q: drive in the Computing Center, on to a CD or to a USB thumb-drive.
http://pnu-club.com/imported/2010/06/62.gif Step 2: Install DevC++
CRead through the license and then click
I Agree to install:
http://pnu-club.com/imported/2010/06/65.gif
DevC++ is released under the GNU Public License, (GPL), which allows you to obtain and modify the source code to the compiler and IDE. If you do so, then the changes you make must also be released under the GPL. However, the programs you create with MinGW
don't normally link with GPL libraries, so you are free to distribute the programs you write using DevC++ and MinGW in any way you wish.
DSelect a folder where you would like to install DevC++. It's best if you don't use a folder that contains spaces, (such as "Documents and Settings"). As you can see here, I've created a folder named
bin, where I install all of the programs that I use. Click
Install once you've selected a folder:
http://pnu-club.com/imported/2010/06/66.gif Step 3: Configure the IDE
The first time you use DevC++ you'll want to configure it to your use. (You'll need to do this the first time you use DevC++ in the Computing Center as well.)
Locate the folder where you want to store your files. In the example shown here, I've selected the
C:\docs\CS250 folder on my local machine. If you are working in the lab, create a CS250 folder on the U: drive. This is the folder where you'll store your files:
http://pnu-club.com/imported/2010/06/72.gif Feel free to change whatever items you like. The only one that I really want is to have line numbers displayed. To do this, select the
Display tab, and click the
Line NUmbers checkbox, as shown here:
http://pnu-club.com/imported/2010/06/74.gif On the Compiler tab, add the following switches when calling the compiler:
-ansi -pedantic -Wall
Step 4 : Compile, Link, and Run
Here are the instructions to edit, compile, link, and run, a simple 3-file C++ project, based on a simple stock program from pages 416-419 in the C++ Primer Plus, 4th Edition.
DevC++ will drop you in the folder you specified when you configured the Environmental Options in Step 3. Unlike Microsoft's Visual Studio, DevC++ doesn't automatically create a new folder for every project. Since you
don't want all of your files in the same folder--especially in this class, where you'll create several different versions of the same files--you should
Create a New Folder to store your project, as shown here:
http://pnu-club.com/imported/2010/06/81.gif Repeat the project with each file in your project. Once you've created all of the files, you can type in the source code using the editor. The screenshot here shows the three source files in the project, after all of the code has been entered:
http://pnu-club.com/imported/2010/06/85.gif CBuild the Project. DevC++ doesn't have separate
Compile and
Build settings, like some development environments. When you click the
Compile button, (or press Control+F9), all of the C++ files in the project are compiled (if necessary), and the linker creates the executable program:
http://pnu-club.com/imported/2010/06/86.gif At the bottom of the screen, you'll also see a set of tabs that allow you to see the actual commands sent to the MinGW compiler, just as if you typed them from the command line:
http://pnu-club.com/imported/2010/06/88.gif DRun the Program. To run the program, you can select the
Run toolbar button, as shown here, or press Control+F10.
http://pnu-club.com/imported/2010/06/89.gif
Unfortunately, when you do that, the program opens a Command Prompt window, runs your program, and then
immediately closes the window before you can examine the output.
To get the window to "stick around", you can add a command:
cin.get();
at the end of your main() function. If you do this, remember to remove the line before you submit your code, otherwise it won't run correctly.
A better solution, though, is to set a
breakpoint at the end of your
main() function, and then
Debug the program instead of
Running it. Simply click in the margin as shown here:
http://pnu-club.com/imported/2010/06/90.gif