Terminology C++ - Members

c++, class, member, terminology

Solution

By "members of a class" could mean all these:

- data members

- member functions

- nested types

So if you have this class:

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
};

then `value_type`, `v`, `w`,`f` and `B` are members of the class `A`.

Problem

If someone says "members in the class" are they talking about the data members, or the member functions? I'm a little confused on which one they are talking about.

Original source