Description: The C++ language allows you to create a class inside of another. This technique is referred to as nesting. At the time of this writing, nesting a class B inside of a class A doesn t give any access privilege of class A member variables and methods to class B. Therefore, there is no major advantage to do it, only a matter of convenience and probably personal preference and opinion. It is said that the next C++ standard will allow a nested class B to have access to the private member variables and methods of the nesting class A.
(As you can see, this program was created in Borland C++ Builder. If you are using another compiler, remove the #pragma and probably the conio lines)
To Search:
File list (Check if you may need any files):
sample\Source2.cpp