C++C++11C++14C++17C++20Learn C++

Learn The Useful Integer Literals In Modern C++

A programming language consists of a lot of expressions in our source code. One of elements of expressions in C++ are literals. A more specific type of literal is Integer Literals. Integer literals are primary expressions that allow values of integer types (i.e., decimal, octal, hexadecimal) to be used in expressions directly. They are further improved by the boolean literals (binary digits) in…
Read more
C++C++11C++14C++17Introduction to C++Learn C++Syntax

What Is The Unrestricted Unions Feature In Modern C++?

Unions are rarely used but are another important data type alternative to structs and classes in modern C++ development. Unions are used to define variables that share storage space. The C++11 standard loosens up the restriction regarding members of unions, and in this post, we explain the unrestricted unions feature that came with C++11. What is a union in modern C++? Unions are used to…
Read more
C++C++11C++14C++17C++20Learn C++Syntax

What Is An Explicit Virtual Override in Modern C++?

Modern C++ has many additions compared to the original C++ standard. Regarding virtual overrides, C++11 tends to tighten the rules, to detect some problems that often arise. To achieve this goal C++11 introduces two new contextual keywords, the final and the override specifiers. Theoverride specifieris used to redefine the base class function in a derived class with the same signature…
Read more
C++C++11C++14C++17C++20Learn C++Syntax

What Is An Eligible Copy Assignment Operator In C++?

In a modern C++ IDE, one of the features of its modern is the copy assignment operator that is used with “operator=” to create a new object from an existing one. In this post, we explain an eligible copy assignment operator in C++. What are classes and objects in C++? Classes are defined in C++ using keyword class followed by the name of the class. Classes are the blueprint…
Read more