C++ Tutorials

Command Line Parameters are the ones which are supplied at the beginning of a program. Most of the old day DOS programs will display a list of matching parameters, if the program call is supplied with -help parameter. This -help command will also be a command line parameter for the program instructing it to display [...]

This C++ Tutorial deals with the main function which is the entry point of any C++ program. A C++ program begins execution at the function main. When a C++ program is compiled and run, the code first executed is the code within the function titled main. Functions – C++ Tutorial: Before knowing about main itself [...]

   This article tries to cover a handful of date and time functions, which can be used in our day to day C++ programming. C++ Date Time – Using _strdate and _strtime: The easiest way to program date and time functions is to  use the functions _strdate and _strtime. Both these functions are declared in [...]

C++ Variable argument functions are useful wherever we are not sure about the number of parameters to be passed. Not all the compilers have the ability to decipher variable arguments. But C++ compiler has the capability to decrypt a variable argument function and provide the parameter values inside the function. The first confusion that would [...]

C++ virtual function is a member function of a class, whose functionality can be over-ridden in its derived classes. The whole function body can be replaced with a new set of implementation in the derived class. The concept of c++ virtual functions is different from C++ Function overloading. C++ Virtual Function – Properties: C++ virtual [...]

Creating or deriving a new class using another class as a base is called inheritance in C++. The new class created is called a Derived class and the old class used as a base is called a Base class in C++ inheritance terminology. The derived class will inherit all the features of the base class [...]

Any data which is declared private inside a class is not accessible from outside the class. A function which is not a member or an external class can never access such private data. But there may be some cases, where a programmer will need need access to the private data from non-member functions and external [...]

The this pointer is used as a pointer to the class object instance by the member function. The address of the class instance is passed as an implicit parameter to the member functions. The sample below, in this c++ Tutorial shows how to use it. It is a common knowledge that C++ keeps only one [...]

   Static data types can be accessed without instantiation of the class in C++. This is applicable for static functions also. The differences between a static member function and non-static member functions are as follows. A static member function can access only static member data, static member functions and data and functions outside the class. [...]

1 2 3