[Dev-C++] C++ standard - Nesting classes.
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Jason H. <jas...@bt...> - 2001-09-26 02:06:23
|
Hi, In a project I have been working on I have nested some classes within a main class that provides an overall functionality. I wanted to make these internal classes inaccessible to anyone using the main class. I had hoped that putting them in a private or protected area of the main class it would stop outside access, but this doesn't seem to work in Dev-C++ (MinGW). Does anyone know if that is standard C++ behaviour? None of my C++ books say anything about access specifiers and nested classes, and they say pretty little about nested classes full-stop. It could reasonally be that only data and methods are affected by access specifiers, but it's hard for me to be sure. I am now looking for an alternative way of hiding those classes, although I have found some interesting options in using an implementation namespace, I am still interesting in hearing any other ideas? Thanx, Jason. |