Category Archives

Destructors in C++

Destructor is a member function which destructs or deletes an object. Syntax: ~constructor-name(); Properties of Destructor: Destructor function is...

Destructors in C++

Destructor is a member function which destructs or deletes an object. Syntax: ~constructor-name(); Properties of Destructor: Destructor function is...

Copy Constructor in C++

We have discussed an introduction to Constructors in C++. In this post, the copy constructor is discussed. What is...

Copy Constructor in C++

We have discussed an introduction to Constructors in C++. In this post, the copy constructor is discussed. What is...

Constructors in C++

What is constructor? A constructor is a member function of a class which initializes objects of a class. In...

Constructors in C++

What is constructor? A constructor is a member function of a class which initializes objects of a class. In...

Simulating final class in C++

Ever wondered how can you design a class in C++ which can’t be inherited. Java and C# programming languages...

Simulating final class in C++

Ever wondered how can you design a class in C++ which can’t be inherited. Java and C# programming languages...

Nested Classes in C++

A nested class is a class which is declared in another enclosing class. A nested class is a member...

Nested Classes in C++

A nested class is a class which is declared in another enclosing class. A nested class is a member...

Local Classes in C++

A class declared inside a function becomes local to that function and is called Local Class in C++. For...

Local Classes in C++

A class declared inside a function becomes local to that function and is called Local Class in C++. For...

Friend class and function in C++

Friend Class A friend class can access private and protected members of other class in which it is declared...

Friend class and function in C++

Friend Class A friend class can access private and protected members of other class in which it is declared...

Some interesting facts about static member functions in C++

1) static member functions do not have this pointer. For example following program fails in compilation with error “`this’...

Some interesting facts about static member functions in C++

1) static member functions do not have this pointer. For example following program fails in compilation with error “`this’...

Static data members in C++

Static data member are class members that are declared using static keyword A static member has certain special characteristics...

Static data members in C++

Static data member are class members that are declared using static keyword A static member has certain special characteristics...