Online Test Banks
Score higher
See Online Test Banks
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


Sorted by:  

How to Install C++ Code::Blocks in Macintosh

The Macintosh version of Code::Blocks for C++ relies on the Xcode distribution from Apple for its compiler. The installation is done in three separate parts for this reason. [more…]

How to Declare Variables in C++

The most fundamental of all concepts in C++ is the variable — a variable is like a small box. You can store things in the box for later use, particularly numbers. The concept of a variable is borrowed [more…]

The Limitations of Integers in C++

The int variable type is the C++ version of an integer. int variables suffer the same limitations as their counting-number integer equivalents in math do. [more…]

The Limits of Floating Point Numbers in C++

Although floating-point variables in C++ can solve many calculation problems, such as truncation, they have some limitations themselves — the reverse of those associated with integer variables. Floating-point [more…]

Types of Constants in C++

A constant value in C++ is an explicit number or character (such as 1, 0.5, or ‘c’) that doesn’t change. As with variables, every constant has a type. In an expression such as [more…]

C++ Character Types

The standard char variable in C++ is a scant 1 byte wide and can handle only 255 different characters. This is plenty enough for European languages but not big enough to handle symbol-based languages such [more…]

Mixed Mode Expressions in C++

C++ allows you to mix variable types in a single expression. That is, you are allowed to add an integer with a double precision floating-point value. In the following expression, for example, [more…]

Perform Simple Binary Arithmetic in C++

A binary operator is one that has two arguments. If you can say var1 op var2, op must be a binary operator. The most common binary operators are the simple operations you performed in grade school. The [more…]

Determine the Order of Operations in C++

All operators perform some defined function in C++. In addition, every operator has a precedence — a specified order in which the expressions are evaluated. Consider, for example, how precedence affects [more…]

Perform Unary Operations in C++

C++ offers all the common arithmetic operations: C++ programs can multiply, add, divide, and so forth. Programs have to be able to perform these operations to get anything done. Arithmetic binary operators [more…]

Use Assignment Operators in C++

An assignment operator in C++ is a binary operator that changes the value of its left argument. The equal sign (=), a simple assignment operator, is an absolute necessity in any programming language. This [more…]

How to Create Your First C++ Program

The first step to creating a C++ program is to create what is known as a project. A project tells Code::Blocks the names of the .CPP source files to include and what type of program to create. Most of [more…]

How to Use Simple Logical Operators in C++

C++ programs have to make decisions. A program that can’t make decisions is of limited use. Invariably a computer program gets to the point where it has to figure out situations such as “Do [more…]

Store Logical Values in C++

The result of a logical operation in C++ can be assigned to a variable of type bool. The term bool refers to Boolean algebra, which is the algebra of logic. This was invented by a British mathematician [more…]

Risk of Logical Operations on Floating-Point Variables in C++

Round-off errors in floating-point computation can create havoc with logical operations in C++, so you must be careful performing logical operations on floating-point variables. Consider the following [more…]

Express Binary Numbers in C++

C++ variables are stored internally as so-called binary numbers. Binary numbers are stored as a sequence of 1 and 0 values known as bits. Most of the time, you don’t really need to deal with which particular [more…]

Control Program Flow in C++ with Branch Commands

The simplest form of flow control in C++ is the branch statement. This instruction allows the program to decide which of two paths to take through C++ instructions, based on the results of a logical expression [more…]

Looping While a Condition is True in C++

Branch statements allow you to direct the flow of a C++ program’s execution down one path or another. This is a big improvement but still not enough to write full-strength programs. [more…]

How to Use the Autoincrement/Autodecrement Feature in C++

C++ programmers very often use the autoincrement ++ or the autodecrement – – operators with loops that count something. Notice from the following snippet extracted from the [more…]

How to Use the For Loop in C++

The most common form of loop in C++ is the for loop. The forloop is preferred over the more basic while loop because it’s generally easier to read (there’s really no other advantage). [more…]

How to Apply Special Loop Controls in C++

C++ defines two special flow-control commands known as break and continue.Sometimes the condition for terminating a loop occurs at neither the beginning nor the end of the loop, but in the middle. Consider [more…]

Range of Numeric Types in C++

It may seem odd, but the C++ standard doesn’t say exactly how big a number each of the data types can accommodate. The standard speaks only to the relative size of each data type. For example, it says [more…]

Declare Variable Types in C++

In C++, variables must be declared and they must be assigned a type. Fortunately, C++ provides a number of variable types. See the table for a list of variables, their advantages, and limitations. [more…]

C++ Programming: 10 Anti-Hacker Tips

As a C++ programmer, you need to learn the things you should do in your C++ code to avoid writing programs that are vulnerable to hackers. There are also describes features that you can enable if your [more…]

Hacking: Example of SQL Injection into a C++ Program

Code injection occurs when the user entices your C++ program to execute some piece of user-created code. “What? My program would never do that!” you say. Consider the most common and, fortunately, easiest [more…]


Sign Up for RSS Feeds

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

Inside Sweepstakes

Win $500. Easy.