[Solved] What exactly is a “member” of a class in C++?


A member is some entity that belongs to a class.

If a class has a function, this is a member function – you might know it as “a method”.
If a class has a variable, this is a member variable – you might know it as “a property”.

int a;
void f () {};

class A{
 int m_A;
  void m_F(){}
}

a is a global variable.
f is a global function.
m_A is a member variable or “property” of the class A.
m_F is a member function or “method” of the class A.

solved What exactly is a “member” of a class in C++?