Online Test Banks
Score higher
See Online Test Banks
eLearning
Learning anything is easy
Browse Online Courses
Mobile Apps
Learning on the go
Explore Mobile Apps
Dummies Store
Shop for books and more
Start Shopping

C++

View:  
Sorted by:  

How to Add Library Functions in C++

The C++ programmer is often required to manipulate zero-terminated strings. C++ provides a number of standard string-manipulation functions to make the job easier. A few of these functions are listed in [more…]

How to Make Room for Wide Strings in C++

The C++ programmer is often required to manipulate wide character strings. The standard C++ library includes functions to handle wide character strings. A few of these functions are listed in this table [more…]

Variable Size in C++

In C++, memory is measured in bytes or bits. The keyword sizeof returns the size of its argument in bytes. The following program uses this to determine the size of the different variable types: [more…]

Factoring and Inheritance in C++

The concept of inheritance, and thus factoring, in C++ allows one class to inherit the properties of a base class. Inheritance has a number of purposes; the main benefit of inheritance is the ability to [more…]

Abstract Classes in C++

As intellectually satisfying as factoring is in C++, it introduces a problem of its own. In an example about bank account classes, specifically the common base class [more…]

C++ Abstract Class Concept

An abstract class in C++ is a class with one or more pure virtual functions. A pure virtual function is a virtual member function that is marked as having no implementation. Most likely it has no implementation [more…]

Why C++ Needs Polymorphism

The capability in C++ of deciding at runtime which of several overloaded member functions to call based on the run-time type is called polymorphism, or [more…]

How Polymorphism Works in C++

As a fence straddler, C++ supports both early and late binding. Any given programming language can support either early or late binding based upon the whims of its developers. Older languages like C tend [more…]

How Does Inheritance Work in C++?

Inheritance in C++ the ability of one class to inherit capabilities or properties from another class. Inheritance is a common concept. You inherit certain properties from the class [more…]

C++ Programming: When Is a Virtual Function Not?

In C++, just because you think that a particular function call is bound late doesn’t mean that it is. If not declared with the same arguments in the subclasses, the member functions are not overridden [more…]

What Is a HAS_A Relationship in C++?

In an example for a C++ program, suppose the class GraduateStudent includes the members of class Studentand Advisor, but in a different way. By defining a data member of class [more…]

How to Use a Subclass in C++

This example C++ program demonstrates the creation and use of two objects, one of class Student and a second of a subclass GraduateStudent. The output of this program is as follows: [more…]

Virtual Considerations in C++

You need to keep in mind a few things when using virtual functions in C++. First, static member functions cannot be declared virtual. Because static member functions are not called with an object, there [more…]

C++: Declaring Static Member Functions

Member functions can be declared static in C++. Static member functions are useful when you want to associate an action to a class, but you don’t need to associate that action with a particular object. [more…]

How to Use Static Members in C++

In C++, you can declare a member to be shared by all objects of a class by declaring that member static. A static data member in C++ is one that has been declared with the [more…]

C++: Uses for Static Data Members

Static data members have umpteen uses in C++, but here are just a few. First, you can use static members to keep count of the number of objects floating about. [more…]

Why You Need Copy Constructors in C++

The constructor is a special function that C++ invokes automatically when an object is created to allow the object to initialize itself. There are two particular variations of the constructor known as [more…]

Why Do You Need Static Members in C++?

By default, data members are allocated on a per-object basis. For example, each person has his or her own name. You can also declare a member to be shared by all objects of a class by declaring that member [more…]

How Address Operators Work in C++

Like the saying goes, “Everyone has to be somewhere.” Every C++ variable is stored somewhere in the computer’s memory. Memory is broken into individual bytes, with each byte carrying its own address numbered [more…]

How to Use Pointer Variables in C++

A pointer variable is a variable that contains an address, usually the address of another variable. This is somewhat analogous to a hotel. When you make your reservation, you may be assigned room 0x100 [more…]

How to Pass Pointers to Functions in C++

One of the uses of pointer variables in C++ is in passing arguments to functions. To understand why this is important, you need to understand how arguments are passed to a function. [more…]

How to Use the Keyword const in C++

A pointer is a variable that “points at” other variables in C++. The keyword const means that a variable cannot be changed once it has been declared and initialized. [more…]

How the Heap Works in C++

The heap is an amorphous block of memory that your C++ program can access as necessary. Learn about why it exists and how to use it.

Just as it is possible to pass a pointer to a function, it is possible [more…]

How to Create a New Code::Blocks Project that Includes a Header

Many C++ newbies want to create the projects they find in books by typing in the code they come across to better see how the process works. However, sometimes just getting the project started can be a [more…]

Attaching to a Running Process Using Code::Blocks

Every time you start a new application, you create one or more processes. A process is simply executable code that is loaded into memory. The CPU reads and executes the instructions to perform the tasks [more…]

Listings:1-2526-5051-7576-100more...

Sign Up for RSS Feeds

Computers & Software
Win $500. Easy. Enter to win now.

Inside Dummies.com

Dummies.com Sweepstakes

Win $500. Easy.