Suchergebnisse für Anfrage "static-variables"

3 die antwort

So greifen Sie auf eine Variable in zwei Dateien zu

3 die antwort

Der Initialisierungscode für statische Variablen wird nie aufgerufen

Ich habe eine Anwendung, die eine statische Bibliothek verwendet, die ich erstellt habe. Eine CPP-Datei in der Bibliothek hat eine statische Variablendeklara...

2 die antwort

NullPointerException mit statischen Variablen

TOP-Veröffentlichungen

6 die antwort

Access statische Klassenvariable der Elternklasse in Python

Ich habe so etwas class A: __a = 0 def __init__(self): A.__a = A.__a + 1 def a(self): return A.__a class B(A): def __init__(self): # how can I access / modify A.__a here? A.__a = A.__a + 1 # does not work def a(self): return A.__aKann ich auf ...

10 die antwort

Wie ist eine statische Variable vor der Deklaration zugänglich?

public class Main { static int x = Main.y; // static int x = y; //Not allowed; y is not defined static int y = x; public static void main(String[] args) { System.out.println(x);//prints 0 } }Wie komme ich durch die Klasse, aber ...

4 die antwort

Objektiv C - Statische und globale Variable?

In meiner .m-Datei für eine Klasse mit dem Namen Ad habe ich 3 statische Zeichenfolgen static NSString *AdStateDisabled = @"disable"; static NSString *AdStateExpired = @"expired"; static NSString *AdStateActive = @"active";Ich kann diese ...