Top "Static-members" questions

A static member is a data field that is shared by all instances of a class or structure for the same program.

Static properties in Swift

I'm trying to convert the following Objective-C code to Swift. In my Objective-C code, there's a static variable and its …

ios class swift static-methods static-members
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
How to initialize static members in the header

Given is a class with a static member. class BaseClass { public: static std::string bstring; }; String has obviously to be …

c++ class static-members
Undefined reference to static constexpr char[]

I want to have a static const char array in my class. GCC complained and told me I should use …

c++ c++11 static-members constexpr
What does "typedef void (*Something)()" mean

I am trying to understand what this means, the code I am looking at has in .h typedef void (*MCB)(); …

c++ typedef static-members void-pointers
How to serialize static data members of a Java class?

When we serialize objects, static members are not serialized, but if we need to do so, is there any way …

java serialization static-members
How do you create a static template member function that performs actions on a template class?

I'm trying to create a generic function that removes duplicates from an std::vector. Since I don't want to create …

c++ stl templates vector static-members
Are static fields open for garbage collection?

Given an hypothetical utility class that is used only in program setup: class MyUtils { private static MyObject myObject = new MyObject(); /*…

java static garbage-collection static-members
Java: Overriding static variable of parent class?

I have the following class which I'm using as the base of all the models in my project: public abstract …

java oop static static-members
C++ definition of dllimport static data member

I do have a class which looks like below: //.h file class __declspec(dllimport) MyClass { public: //stuff private: static int …

c++ dll static static-members