Top "Member" questions

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

Why can't we initialize members inside a structure?

Why can't we initialize members inside a structure ? example: struct s { int i = 10; };

c struct initialization member
C++ inline member function in .cpp file

I know that inline member functions by definition should go into the header. But what if it's not possible to …

c++ function inline member
default visibility of C++ class/struct members

In C++, why is private the default visibility for members of classes, but public for structs?

c++ class struct member
Member variables in ES6 classes

Is there any way to use the ECMAScript6 class notation to declare either a static class variable or a default …

javascript class member static-members ecmascript-6
MDX Calculated member filter by dimension attribute

I want to create a calculated member and filter it by dimension. This is WORKING example: ( [Policy].[Policy Status].&[…

filter mdx member dimension
C# Class Auto increment ID

I am creating a class in C# called "Robot", and each robot requires a unique ID property which gives themselves …

c# class identity auto-increment member
Trailing underscores for member variables in C++

I've seen people use a trailing underscore for member variables in classes, for instance in the renowned C++ FAQ Lite. …

c++ naming-conventions member
Get a pointer to object's member function

Here is the problem: 1) I have a class like so: class some_class { public: some_type some_value; int some_…

c++ function-pointers member
How do you pass a member function pointer?

I am trying to pass a member function within a class to a function that takes a member function class …

c++ class function pointers member
C++ Member Variables

Consider the following class: class A { A(); int number; void setNumber(int number); }; You could implement 'setNumber' in 3 ways: Method 1: …

c++ class variables scope member