Top "Member" questions

A member is an element of an object in the object-oriented programming paradigm.

C++ declaring a static object in a class

I'm trying to declare a static object of a class A that I wrote in a different class B, like …

c++ class object static member
C++ Access private static member from public static method?

Let's say I have a .hpp file containing a simple class with a public static method and a private static …

c++ class static private member
pointer to const member function typedef

I know it's possible to separate to create a pointer to member function like this struct K { void func() {} }; typedef …

c++ function pointers member
How to calculate offset of a class member at compile time?

Given a class definition in C++ class A { public: //methods definition .... private: int i; char *str; .... } Is it possible to …

c++ templates metaprogramming offset member
'struct <anonymous>' has no member named

Looking for the way to reference the node and set it to null for the creation function. Any suggestions from …

c struct queue member abstract-data-type
Pointer to class member as template parameter

Is it possible to have non-type template parameter which is actually a pointer to a class member? What I'm looking …

c++ templates pointers member
C++ static template member, one instance for each template type?

Usually static members/objects of one class are the same for each instance of the class having the static member/…

c++ templates static member
How do you use the non-default constructor for a member?

I have two classes class a { public: a(int i); }; class b { public: b(); //Gives me an error here, because …

c++ class constructor default member
Const reference as class member

Even if the subject was discussed many times around here, I can't find a conclusive explanation regarding my particular case. …

c++ class reference constants member