Đang chuẩn bị liên kết để tải về tài liệu:
Lecture Practical C++ programming - Chapter 14: More on classes

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

This chapter describes some miscellaneous features. Each of these features pretty much stand on their own. The following will be discussed in this chapter: Define “friend”, describe an example when you would use a “friend” function, define “constant member functions”,. Inviting you refer. | Chapter - 14 More on classes Practical C Programming Copyright 2003 O Reilly and Associates Page 1 Friends Nobody sees my private stuff except my friends. In C a function that is the friend of a class can access that private data for that class Friends must be named by the class Friends are not the same as member functions Practical C Programming Copyright 2003 O Reilly and Associates Page 2 Example private public . . if sl.count s2.count Friends can access private members Rest of function Practical C Programming Copyright 2003 O Reilly and Associates Page