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.

How to initialize private static members in C++?

What is the best way to initialize a private, static data member in C++? I tried this in my header …

c++ initialization static-members
Error message Strict standards: Non-static method should not be called statically in php

I have the following php. However when I see the index.php I get the following error message. Strict standards: …

php static-members
How to initialize static variables

I have this code: private static $dates = array( 'start' => mktime( 0, 0, 0, 7, 30, 2009), // Start date 'end' => mktime( 0, 0, 0, 8, 2, 2009), // End date 'close' => …

php class static-members
Initialisation of static vector

I wonder if there is the "nicer" way of initialising a static vector than below? class Foo { static std::vector&…

c++ static-members stdvector
PHP 5: const vs static

In PHP 5, what is the difference between using const and static? When is each appropriate? And what role does public, …

php object constants class-design static-members
Static member functions error; How to properly write the signature?

I am getting an error when trying to compile my code in g++ using the current signature: cannot declare member …

c++ static-members method-signature static-functions
C# Static variables - scope and persistence

I just did a little experiment: public abstract class MyClass { private static int myInt = 0; public static int Foo() { return myInt; } …

c# static-methods static-members
Static enum vs. Non-static enum

What's the difference between static and non-static enum in Java? Both usages are same. Is it correct that all static …

java enums static-members
Which is best way to define constants in android, either static class, interface or xml resource?

I'm developing an android application which uses web service to get data from server, for that I'm having three different …

android xml configuration constants static-members
Mock private static final field using mockito or Jmockit

I am using private static final LOGGER field in my class and I want LOGGER.isInfoEnabled() method to return false. …

java junit mockito static-members jmockit