开发者

Does it make a difference whether I put 'friend class xxxxx' in the public or private section?

开发者 https://www.devze.com 2022-12-28 13:54 出处:网络
class A1 { public: f开发者_Python百科riend class B; } class A2 { private: friend class B; } Any difference?No, access specificators have no effect on friend declaration.
class A1 { public: f开发者_Python百科riend class B; }
class A2 { private: friend class B; }

Any difference?


No, access specificators have no effect on friend declaration.

0

精彩评论

暂无评论...
验证码 换一张
取 消