www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - <Novice> Friend Classes

reply "aelmetwaly" <aelmetwaly gawab.com> writes:
Hi there,
How can I access private data member of friend class on
different files, like in C++?
Nov 06 2004
parent "Ben Hinkle" <bhinkle mathworks.com> writes:
"aelmetwaly" <aelmetwaly gawab.com> wrote in message
news:cmj7qp$2h2u$1 digitaldaemon.com...
 Hi there,
 How can I access private data member of friend class on
 different files, like in C++?
if the files are in the same package you can use package protection instead of private. Private members are only visible in the module. See http://www.digitalmars.com/d/attribute.html for more info.
Nov 06 2004