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.
如果有人说“类中的成员”,他们是在谈论数据成员还是成员函数?我有点困惑他们在说哪一个。
“一个班级的成员”可能意味着所有这些:
所以如果你有这个类:
class A { typedef std::string value_type; //nested type value_type v; //data member int w; //data member void f(); //member function struct B {}; //nested type };
那么value_type, v, w,f和B是类的成员A。
value_type
v
w
f
B
A