C++: Nesting public in private == private?
cyrille.damez
EMAIL HIDDEN
Wed Mar 25 02:37:48 CET 2009
> If I would have a nested class with its attributes declared public, in
> the private section of the outer class, would the attributes become
> private to other classes?
> This is for making a node class inside a list class. Would another
> approach be better? The list is not to be made generic, just supposed to
> store pointers to a specific type.
If the inner class is in the private section, then other classes won't be allowed to see it (as if it was in another namespace), so they won't be able to access its members.
What's wrong with std::list ?
Créez votre adresse électronique prenom.nom at laposte.net
1 Go d'espace de stockage, anti-spam et anti-virus intégrés.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.music-bar.org/pipermail/music-bar/attachments/20090325/0f993b5c/attachment-0001.html>
More information about the music-bar
mailing list