Wednesday, April 27, 2011

Creating and Executing a Dev-C++ 4 Application

OLD IS GOLD :P
Dev-C++ is a free programming environment. To get it, you can download it from http://www.bloodshed.net. If you decide to use it, you should help the developers with a financial contribution.
  1. Start Dev-C++ 4

  2. On the main menu, click File -> New Project...
  3. On the New Project dialog box, click the Project property sheet if necessary.
    Click Console Application

  4. Click OK.
  5. On the subsequent New Project dialog box, type Exercise to change the name of the project:

  6. Click OK. You will be asked to create a location for the project.
  7. Click the Create New Folder button .
  8. Type Exercise1 and press Enter.
  9. Double-click Exercise1 to display it in the Save In combo box:

  10. Click Save.
  11. Because the project has already been saved, it is better to save your C++ files as you go. As it happens, Dev-C++ has already created the first C++ file for you.
    Change the contents of the file as follows:
     
    #include 
    #include 
    
    int main(int argc, char *argv[])
    {
    cout << "C++ is Fun!!!";
    getchar();
    return 0;
    }

  12. To save the current C++ file, on the Main toolbar, click the Save button
  13. Type Exo as the name of the file.
  14. Click Save.
  15. To execute the program, on the main menu, click Execute -> Compile

  16. After the program has been compiled, click Execute.
  17. After viewing the program, press Enter to close the DOS window to return to Dev-C++
 
Borland C++BuilderX

Borland C++BuilderX is a commercial programming environment developed by Borland.
To help programmers, Borland published a free version, called Personal Edition, that you
can download and use for your lessons.
  1. On the main menu of C++BuilderX, click File -> New...
  2. In the Object Gallery dialog box, click New Console

  3. Click OK
  4. In the New Console Application - Step 1 of 3, enter the name of the new application
  5. in the Name edit box. In this case, you can type Exercise1

  6. Click Next

  7. In the New Console Application Wizard - Step 2 of 3, accept all defaults and click Next
  8. In the New Console Application Wizard - Step 3 of 3, click the check box under Create
  9. Click Untitled1 and delete it to replace it with Exercise

  10. Click Finish
  11. In the Project Content frame, double-click Exercise.cpp to display it in the right frame

  12. To execute the application, on the main menu, click Run -> Run Project

0 comments:

Post a Comment