Here is how to get started learning and programming with C++ at a minimum cost.
Programmers using C are rapidly switching to C++ to expand their prowess to the Object Oriented arena. Even though modern UML tools currently available make it easier to automate the coding process, C programmers, or those transitioning from other languages like Visual Basic, find getting educational resources difficult and sometimes expensive. The learning process has been made somewhat easier through the Open Source Foundation efforts in the GNU project. This is especially true for programmers on limited income or with limited resources.
“GNU Project was launched in 1984 to develop a complete Unix-like operating system which is free software: the GNU system. Variants of the GNU operating system, which use the kernel called Linux, are now widely used; though these systems are often referred to as “Linux”, they are more accurately called GNU/Linux systems.” (from the GNU website). Even with this limited beginning, GNU software tools have become very popular. Many, such as the GNU C++ compiler and linker, have been ported to the Windows platform to allow transition to other platforms.
Now C programmers are able to write C++ programs and with little effort, port those programs to Unix or Linux by recompiling on that platform with the GNU Unix or Linux implementation. Where platform independence in programming must be of primary importance, the GNU C++ compiler is ideal. It is available on every popular hardware and software platform in common use today. This software independence is facilitated by several libraries that can be called from specific platforms to make the underlying C++ code more generic. The unique libraries provide the platform integration and a interface to the base code.
Among the most notable of GNU Open Source libraries is the Qt® libraries, and wxWidgets. Third party commercial libraries are available as well, such as the Borland® C++ Builder® VCL. These libraries supply multi-platform presence while allowing a single C++ coding portal. Each of these libraries have third party or vendor supplied bindings to other popular programming languages and databases like Python, ODBC, and MySql.
Programmers learning C++ will find documentation on C and C++ to be minimal at best. Learning a structured procedural language like C++ is made far easier when prior experience with Microsoft Visual Basic® or some other semi-structured programming language has been obtained. Remember the GNU tools are generic in nature, designed to contain common features of C++ found on several platforms and encompassing features of the most common language standards. A good information source for language standards for C++, is your local university library or large public library in the computer programming section.
Learning materials for C++ in the Open Source community are also available online from several sources. Some assume you already know the C programming syntax. Others adopt the view that you may be a programmer of a different language but know nothing about C or C++. You must review the description of each to find the tutorial best suited to your experience. Almost all rely on the GNU compiler/linker for demonstration examples. They provide only simplistic minimal applications not designed to be practical. You must use these tutorials as a spring board of learning the entire language depth in order to create fully functional practical applications for the real world. It helps to have a functional model in mind. The address book or Personal Information Manager (PIM) application is one practical application used by many tutorials. You may decide to use this model and embellish it any way you want in order to enhance your programming skill and knowledge.
The nicest aspect of the GNU project is that it makes a very powerful programming language available to everyone at no cost to the user (the GNU Foundation does ask for donations to further the project goals). This freedom does come with a price, however. The GNU Foundation stipulates that programs generated must be of the Open Source type. In other words, you cannot create a C++ program with the GNU tools for profit without paying a license fee. This seems fair, since the software is supplied for free and the development has been due to the volunteer efforts of C and C++ programmers from around the world, and generous monetary donations from benefactors.
Obtaining the GNU C++ compiler and linker is very easy. The official web site is www.gnu.org. All one has to do to get the tools is visit the web site and click on the “GNU software packages” link. The compiler is available for download directly or a CD-ROM is available with the complete GNU software library. You can even become a contributor to the GNU project if your level of expertise rises to that level. There are links on the GNU homepage to direct you to the contributors pages.
Installing and using the C++ compiler and linker is just as easy as obtaining it. The compressed download file contains instructions as to how to install on your operating system and also contains documentation for the compiler and linker. You may use the local copy or the online version.
One word of caution is necessary here. The GNU C++ compiler and linker is not designed to be a competitor with Microsoft or Borland products (these software giants also have C++ products). It is, however, designed to be completely platform independent. That means that if you desire to create applications that may be made available on Windows XPTM, VistaTM, Mac OS XTM, and Linux (using the same code), this is one possible way to accomplish it. In fact, there are many existing applications written with just this goal in mind. Obviously, (obvious to C programmers that is) the most difficult to handle between platforms is the input/output interface. Each operating system has a unique way of presenting the user graphics, data, input, and sound. This is where platform independent libraries make the task a thousand times easier. The Qt, wxWidget, and Borland VCL libraries provide this ability in varying degrees. The use of one of the libraries will be the topic of another article in the future.