|

楼主 |
发表于 2005-9-2 09:30:32
|
显示全部楼层
Post by rickxbx
那是编译器的问题了,或者编译器认为这样挺好
To allow nested classes to access the private members of their surrounding class; to access the private members of other nested classes; or to allow the surrounding class to access the private members of its nested classes, the friend keyword must be used.
--------------- from C++ Annotations Version 6.2.2 BY Frank B. Brokken
我用的是gcc4, <<thinking in c++>>里也说需要加friend. :ask |
|