static specifier
Da cppreference.com.
![]() |
Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate.
La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
All'interno di una classe, dichiara i membri non legato a casi specifici.
Original:
Inside a class, declares members not bound to specific instances.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Indice |
[modifica] Sintassi
static class_attribute | |||||||||
static class_method | |||||||||
[modifica] Note
# Attributi statici deve essere definito al di fuori della classe
Original:
# static attributes must be defined outside the class
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Attributi costanti # statici integrali possono essere definiti (fino al c++11) inline
Original:
# static constant integral attributes can be defined inline (fino al c++11)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
# All'interno di metodi statici non c'è NJ puntatore
Original:
# inside static methods there is no NJ puntatore
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
# I metodi statici non possono avere altro specifico per la classe specificatore funzione cv, virtual o sostituzioni esplicite
Original:
# static methods cannot have other class-specific function specifier as cv, virtual or sostituzioni esplicite
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[modifica] Vedi anche
[modifica] Esempio
struct C { static void foo(); static int n; static const int m = 16; // inline inizialization }; int C::n = 0; // static attribute definition void C::foo() { // no reference to non-static members/methods can occur here }