Yearly Archives

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...

Why is the size of an empty class not zero in C++?

When structure is introduced in C, that time there is no concept of Object. So According to C standard...

Why is the size of an empty class not zero in C++?

When structure is introduced in C, that time there is no concept of Object. So According to C standard...

Can a C++ class have an object of self type?

A class declaration can contain static object of self type, it can also have pointer to self type, but...

Can a C++ class have an object of self type?

A class declaration can contain static object of self type, it can also have pointer to self type, but...

Structure vs class in C++

In C++, a structure is the same as a class except for a few differences. The most important of...

Structure vs class in C++

In C++, a structure is the same as a class except for a few differences. The most important of...

Abstraction in C++

Data abstraction is one of the most essential and important feature of object oriented programming in C++. Abstraction means...

Abstraction in C++

Data abstraction is one of the most essential and important feature of object oriented programming in C++. Abstraction means...