Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
众所周知,友元机制破坏了 C++ 中的封装。那么在哪些情况下我们必须使用友元函数(或类),友元函数的好处是什么?