What is the use of nested classes?
My doubt is whatever a nested class provides is provided by inheritance. But whatever inheritance provides is not provided by nested classes(such as run time polymorphism and virtual functions). Also imparting properties of a class to another classes through inheritance is easier than using nested classes.
Why then we need nested classes?