Learning C++ With Linux
Object-Oriented programming is a hot topic in the computer industry these days, and most experts agree that C++ is the predominant object-oriented programming language. Many programmers are familiar with the C programming language and would like to move to C++, but feel they lack the necessary tools and resources, particularly if the training has to be done on their own time.
It should therefore come as welcome news to learn that Linux makes an ideal platform for learning C++. This article covers some of the C++ programming tools available under Linux and refers the reader to additional resources, many of them freely available on the Internet.
By resources, I am referring to sources of information that will help you learn C++ and solve programming problems.
A large number of books on C++ and object-oriented design and programming are available, some better than others. The three I suggest here are among the most popular of those that are specific to C++; you may be able to borrow a copy from your local public, school, or corporate library. As these concentrate more on the C++ language itself, you may wish to supplement them with books that cover object-oriented analysis and design.
The C++ Programming Language (2nd edition), Bjarne Stroustrup, Addison-Wesley, 1991
Annotated C++ Reference Manual, Bjarne Stroustrup and Margaret Ellis, Addison-Wesley, 1990
C++ Primer (2nd edition), Stan Lippman, Addison-Wesley, 1989
There are a number of publications related to object-oriented programming, including the following:
C++ Report
Object Magazine
Journal of Object-Oriented Programming
For those with access to Usenet, these newsgroups are relevant and can be very useful, both as a source of answers to specific questions and for picking up the latest developments in C++ and object-oriented programming:
comp.lang.c++
comp.std.c++
comp.object
The following Frequently Asked Question (FAQ) lists are periodically posted to Usenet, and are available by anonymous FTP from Internet archive sites (listed in brackets):
C++ FAQ(sun.soe.clarkson.edu:/pub/C++/FAQ)
G++ FAQ(rtfm.mit.edu:/pub/usenet/news .answers/g++-FAQ/plain)
comp.object FAQ(rtfm.mit.edu:/pub/usenet/news .answers/object-faq/*)
Listed here are a number of useful C++ programming tools. If you use one of the standard Linux distributions you probably have most of these already, otherwise you can get them from a major archive site. To save time and disk space, I suggest obtaining the Linux binaries rather than building them from source.
The standard Linux C++ compiler is GNU g++ from the Free Software Foundation. It follows the evolving ANSI C++ standard and supports most features found in AT&T's cfront 3.0 compiler, including templates. It does not yet support exceptions.
Unlike cfront, which is a preprocessor, g++ generates native code. As the compiler is evolving quickly, I recommend getting the latest version. (At the time of writing most Linux distributions included version 2.5.8; version 2.6.0 had just been released.)
Gdb is the GNU symbolic debugger; you have probably used it already for debugging C programs under Linux. It supports most C++ data types and language constructs, and transparently handles C++ “name demangling”. Gdb runs well inside Emacs, or you can use the xxgdb graphical user interface under X. The documentation for gdb, in info format, describes the features specific to C++ debugging.
The programmer's editor of choice, Emacs, has a C++ mode that assists in editing. It works well in conjunction with gdb and g++, allowing you to compile and debug from within the editor.
If you want to run any meaningful programs, such as examples from a textbook or code of your own, you will want some class libraries. A number of C++ class libraries are available under Linux.
The GNU libg++ library provides the standard C++ iostream class. It also includes a number of additional useful classes, from complex numbers to general-purpose stack, queue, and set objects. Since the source is freely available, you can read it to understand how the libraries were implemented. Libg++ is well documented in the included info pages.
InterViews is an object-oriented toolkit for graphical user interface programming in C++. It is included as the “iv” series in the Slackware distribution of Linux. A new version of InterViews is included in the recently released revision 6 of the X Window System (X11R6), under the name Fresco. Fresco has been sucessfully compiled with GNU g++ version 2.6.0.
NIHCL, the National Institutes of Health Class Library, is a portable C++ translation of the Smalltalk-80 class library, by Keith Gorlen of NIH. The source is available on the Internet from FTP site alw.nih.gov in the directory /pub/NIHCL. At time of writing NIHCL would not compile under g++; this should be corrected in a future release.
ObjectBuilder is a graphical user interface builder for the OI C++ toolkit. It is designed to simplify the development of X11-based user interfaces. The Linux version is freely distributed in binary format; the same product is sold commercially by ParcPlace Systems for other computing platforms.
If, as some experts recommend, you want exposure to a “pure” object-oriented language, you can investigate GNU Smalltalk. The GNU gcc compiler also supports Objective-C, another object-oriented language based on C and Smalltalk. Both of these tools are available as packages under Slackware Linux.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Designing Electronics with Linux | May 22, 2013 |
| Dynamic DNS—an Object Lesson in Problem Solving | May 21, 2013 |
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
- seo services in india
2 hours 29 min ago - For KDE install kio-mtp
2 hours 30 min ago - Evernote is much more...
4 hours 30 min ago - Reply to comment | Linux Journal
13 hours 15 min ago - Dynamic DNS
13 hours 49 min ago - Reply to comment | Linux Journal
14 hours 48 min ago - Reply to comment | Linux Journal
15 hours 38 min ago - Not free anymore
19 hours 40 min ago - Great
23 hours 27 min ago - Reply to comment | Linux Journal
23 hours 35 min ago
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Featured Jobs
| Linux Systems Administrator | Houston and Austin, Texas | Host Gator |
| Senior Perl Developer | Austin, Texas | Host Gator |
| Technical Support Rep | Houston and Austin, Texas | Host Gator |
| UX Designer | Austin, Texas | Host Gator |
| Web & UI Developer (JavaScript & j Query) | Austin, Texas | Host Gator |
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?




Comments
new to linux
hi all,
m new to linux and want to work with c on linux (ubuntu 8.0) plz help.
new to linux
hi all,
m new to linux and want to work with c on linux (ubuntu 8.0) plz help.
send for me code c++ for
send for me code c++ for linux
codeblocks works great for
codeblocks works great for windows and linux
Compiler for UBUNTU
http://ubuntuforums.org/showthread.php?t=120421
Check the abovementioned link, but if for some reason the link doesn't help or is broken, just look for other articles on Google or the UBUNTU homepage regarding installation of a C compiler.
GCC is one of the most popular compilers distributed with GNU/Linux.
Looking for free Linux C++
Anyone know where I can get a free Linux C++ compiler to run under ubuntu Linux? Maybe also IDE or the like?
GCC :) for the first one
GCC :) for the first one (g++)
ajunta or geany are nice IDEs