In C++ a structure is pretty much the same as a class with the only difference that the default member access of a structure is public and that of a class is private. However, structures may not be used as replacements for classes. They may only be used in places where you would use a plain-old 'C' structure. Everything the C++ language has added to structures may not be used. In other words, a structure does not have methods or operators, does not have access specifiers (public, protected, private), does not have friends etc. |