Sorted by:  

Source Code from Beginning Programming with C++ For Dummies

Look no further for the downloadable source code from Beginning Programming with C++ For Dummies, 2nd Edition, and the free, open source Code::Blocks environment and GCC C++ compiler used in the book. [more…]

Multiple Inheritance in C++

If one C++ class can inherit from another, then the question immediately arises, "Can a class inherit from two (or more) classes?" The answer in is an unqualified [more…]

Strongly Typed Enumerations in C++

Programming is all about legibility. It's difficult (actually it's impossible) to write and maintain a program that you can't read. Part of reading a source-code listing is understanding what the numbers [more…]

Abstract Classes and C++

C++ supports late binding, which is when it resolves a method call based on the run-time type (or dynamic type) of the target object rather than its declared type [more…]

The 10 Most Common Beginner Programming Mistakes

As a beginning C++ programmer, you may never recognize mistakes that you make. All you notice is that it takes a lot longer to write and debug your programs. Even then, once the programs are deployed they [more…]

Templates in C++

C++ is an example of a strongly typed programming language. It's this strong typed-ness that allows functions to be overloaded, as shown in the following code snippet: [more…]

Stream Formatting with I/O Manipulators

One of the difficulties with C++ in moving to stream objects for output is learning how to format the output. There are actually two ways to format-stream I/O. [more…]

How to Read a Complex C++ Expression

C++ is full of little symbols, each of which adds to the meaning of expressions. The rules of C++ grammar are so flexible that these symbols can be combined in almost impenetrably complex combinations. [more…]

5 Ways to Avoid Pointer Problems in C++

In C++, a pointer is a variable that contains the address of an object in the computer's internal memory. Use these steps to avoid problems with pointers in C++: [more…]

How and When to Make Deep Copies in C++

Classes that allocate resources in their constructor should normally include a copy constructor to create copies of these resources. Allocating a new block of memory and copying the contents of the original [more…]

Beginning Programming with C++ For Dummies Cheat Sheet

C++ isn't an easy programming language to master. Only through experience will the myriad combinations of symbols start to seem natural to you. This Cheat Sheet, however, gives you some solid tips on easing [more…]

Getting the Most Out of Makefiles

Since the beginning of time, or at least since the beginning of the Unix operating system, programmers have used a utility called make to build their applications. And it’s still often used today. The [more…]

Compiling and Linking Applications with Makefiles

When you create an application, you write your code in various source code files. For one application, you can have many different source code files. Some large corporate projects may have hundreds [more…]

The C++ Standard Library Categories

The Standard Library documentation uses a formal approach that you’re going to find difficult to read and even harder to understand. The best way to begin is to break the Standard Library into smaller [more…]

Parsing Strings in C++ Using a Hash

Hashes are an important security requirement for applications today. A hash creates a unique numeric equivalent of any string you feed it. Theoretically, you can’t duplicate the number that the hash creates [more…]

How to Obtain Information in C++ Using a Random Access Iterator

Most containers let you perform random access of data they contain. For example, the RandomAccessexample shows that you can create an iterator and then add to or subtract from the current offset to obtain [more…]

Locating Values in C++ Using the Find Algorithm

The Standard Library in C++ contains a number of functions to find something you need within a container. Locating what you need as efficiently as possible is always a good idea. Unlike your closet, you [more…]

The C++ Random Number Generator

Random number generators fulfill a number of purposes. Everything from games to simulations require a random number generator to work properly. Randomness finds its way into business what-if scenarios [more…]

Performing Comparisons Using min and max in C++

Computer applications perform many comparisons. In most cases, you don’t know what the values are in advance or you wouldn’t be interested in performing the comparison in the first place. The [more…]

How to Work with Temporary Buffers in C++

Temporary buffers are useful for all kinds of tasks. Normally, you use them when you want to preserve the original data, yet you need to manipulate the data in some way. For example, creating a sorted [more…]

The Need for User-Defined Literals (UDLs) in C++

The whole point of literals is to make code more readable and easier to maintain. However, built-in literals are limited to a few data types, summarized as follows: [more…]

Creating C++ Literals with Prefixes and Suffixes

Saving time and effort is part of the reason you use literals. There is a shorthand way to create literals and ensure that you obtain the correct constant type. Many of the standard literals provide you [more…]

Raw and Cooked String Processing in C++

There are many ways to define literals. Of course, the kind of information that a literal affects is the most common method. However, literals can also be raw or cooked. A [more…]

The UDLs Included in the C++ Standard Library

Even though you can currently create User-Defined Literals (UDLs) for some basic types, there are many situations where developers need UDLs for classes as well. In some cases, these classes are part of [more…]

Creating Your Own UDLs in C++

The Standard Library, coupled with the built-in features of C++, provide you with an interesting array of literals. However, the true value of literals becomes more obvious when you create your own. [more…]

Sign Up for RSS Feeds

Computers & Software

Inside Dummies.com