C++ provides the following classes to perform output and input of characters to/from files: ofstream: Stream class to write on…
Read More

C++ provides the following classes to perform output and input of characters to/from files: ofstream: Stream class to write on…
Read More
Preprocessor directives are lines included in the code of programs preceded by a hash sign (#). These lines are not…
Read More
Exceptions provide a way to react to exceptional circumstances (like runtime errors) in programs by transferring control to special functions…
Read More
Implicit conversion Implicit conversions are automatically performed when a value is copied to a compatible type. For example: 1 2…
Read More
Before getting any deeper into this chapter, you should have a proper understanding of pointers and class inheritance. If you…
Read More
Friend functions In principle, private and protected members of a class cannot be accessed from outside the same class in…
Read More
Special member functions are member functions that are implicitly defined as member of classes under certain circumstances. There are six:…
Read More
Overloading operators Classes, essentially, define new types to be used in C++ code. And types in C++ not only interact…
Read More
Classes are an expanded concept of data structures: like data structures, they can contain data members, but they can also…
Read More
Type aliases (typedef / using) A type alias is a different name by which a type can be identified. In…
Read More
Data structures A data structure is a group of data elements grouped together under one name. These data elements, known…
Read More
In the programs seen in previous chapters, all memory needs were determined before program execution by defining the variables needed.…
Read More
In earlier chapters, variables have been explained as locations in the computer’s memory which can be accessed by their identifier…
Read More
The string class has been briefly introduced in an earlier section. It is a very powerful class to handle and…
Read More
An array is a series of elements of the same type placed in contiguous memory locations that can be individually…
Read More
Scopes Named entities, such as variables, functions, and compound types need to be declared before being used in C++. The…
Read More
In C++, two different functions can have the same name if their parameters are different; either because they have a…
Read More
Functions allow to structure programs in segments of code to perform individual tasks. In C++, a function is a group…
Read More
A simple C++ statement is each of the individual instructions of a program, like the variable declarations and expressions seen…
Read More
The example programs of the previous sections provided little interaction with the user, if any at all. They simply printed…
Read More