Starter: Useful tool for fast C++ programming practice

1. Introduction
2. Notepad++
3. C++ Builder compiler
4. Test.cpp
5. Compile and Run the program

1. Introduction

As a graduate student in Computer Science, I'm always looking for an easy tool for practicing programming or coding in Windows system. It is so boring and time-wasting to use the 'famous' IDEs, e.g. VS, Eclipse, Code:Blocks, NetBeans, etc. You will find such IDE like Visual Stdio is so complicated and slow when you just need a small piece of code running, or just practicing some classic algorithms like quick sort or Dijkstra shortest route. Some say that you can use turbo C++, which was a very good tool for starters, and which is published in 1990s. However for now first you should know if you can find one which can run on your computer, then make sure you'll get used to the "old fashion"---- blue screen and yellow characters.
So, when I started to re-learn the programming language by myself these days, facing C++, I recommend the Notepad++ and C++ Builder and CMD as the C++ practicing tool. Such an easy way to read, write, compile and run your cpp program. Let's have a try!

2. Notepad++ (for windows)

    Notepad++ is a free source code editor which support many languages.
    You can download the latest version here: 

Just like the notepad in windows, Notepad++ is very easy to use and very suitable for C++ practice.
I choose Notepad++ because: 
    1. It is Free!
    2. It is 
    3. It is Fast and Simple.
    4. It has many useful Shortcuts.

    Install: Just click 'next' all the way down and finish the installing. 

3. C++ Builder compiler

    This the Borland C++ compiler v5.5 free version.
    You can download from:

    Install: Just click 'next' all the way down and finish the installing. 

   Important Steps:
   1.After the installing is completed, go into the folder where you install (My is C:\Borland\BCC55\).
   2.Create a new folder (My named CP). 
   3.COPY all the files in folder Bin, Include and Lib to the new folder you just created (My is folder CP).

 4. Test.cpp

Here we are! After the previous steps, we can now start our C++ programming and enjoy the convenience of this tool!
Below is my test code named Test.cpp (modified from the book 'C++ Primer plus') :

#include <iostream>

int main(){
 using namespace std;
 char ch;

 cout << "Type, and I shall repeat.\n";

 while (ch != '.')
     if (ch == '\n')
       cout << ch; // done if newline
       cout << ch;
 return 0;

When you have the code in the notepad++ editor, save this as a  .cpp file and save it in the folder you just created. (My is C:\Borland\BCC55\CP) 

Note: Don't forget to choose language in your Notepad++ editor, for highlighting the keywords. (Click Language button in the menu bar and choose C and find the C++).

5. Compile and Run the program.

        Now we have the Notepad++ to read and write the C++ code,
        the C++ Builder Compiler to compile the C++ code,
        the windows cmd to run the code.

        So, the final four steps, 
        which are also the steps we'll use in the future to practice the c++ programming :

                   1. Click start in windows run 'cmd' and open the command line.
                   2. Go into the folder where you just created (my is C:\Borland\BCC55\CP).
                   3. Type command 'bcc32 Test.cpp'. This command 'bcc32' is used to compile the cpp files.
                   4. If there is no error, you'll have a file named Test.exe in the same folder. 
                       Just type 'Test' to run the program. 

If there is no error when compiling:

If errors occur, errors would be shown like this: 

Run the program :

No comments:

Post a Comment