7.3 — Local variables

In lesson , we introduced local variables, which are variables that are defined inside a function (including function parameters). It turns out that C++ actually doesn’t have a single attribute that defines a variable as being a local variable. Instead, local variables have several different properties that differentiate how these …

5.1 — Constant variables (named constants)

Introduction to constants In programming, a constant is a value that may not be changed during the program’s execution. C++ supports two different kinds of constants: Named constants are constant values that are associated with an identifier. These are also sometimes called symbolic constants, or occasionally just constants. Literal constants …

4.2 — Void

Void is the easiest of the data types to explain. Basically, means “no type”! Void is our first example of an incomplete type. An incomplete type is a type that has been declared but not yet defined. The compiler knows about the existence of such types, but does not have …

2.4 — Introduction to function parameters and arguments

In the previous lesson, we learned that we could have a function return a value back to the function’s caller. We used that to create a modular getValueFromUser function that we used in this program: #include <iostream> int getValueFromUser() { std::cout << “Enter an integer: “; int input{}; std::cin >> …

Site migration

Hey all, In order to clean up the site infrastructure and address some security and spam issues, we’ve migrated the site to a new (faster) server, and essentially rebuilt the site from the ground up. Some of the plugins used to provide functionality (including the code syntax highlighter) weren’t compatible …

B.1 — Introduction to C++11

What is C++11? On August 12, 2011, the ISO (International Organization for Standardization) approved a new version of C++, called C++11. C++11 adds a whole new set of features to the C++ language! Use of these new features is entirely optional — but you will undoubtedly find some of them …