• Nie Znaleziono Wyników

static in class

N/A
N/A
Protected

Academic year: 2021

Share "static in class"

Copied!
1
0
0

Pełen tekst

(1)

//============================================================== // Deklaracja kategorii 'static';

// zmienna 'static'

// jako licznik wywolan funkcji zawartej w klasie; //

// ver data temat autor // 100 2010/11/14 Pierwszy projekt J.Malinowski // 101 2015/10/03 Cleanup JM // 102 2019/12/16 Cleanup JM //============================================================== #include <iostream> using namespace std; //---class A { // public: private: static int cnt; public: void Fun() { cnt++; } int Cnt() { return cnt; } }; //---int A::cnt=0; //---int main() { A a;

// cout << A::cnt << endl; cout << a.Cnt() << endl; for(int i=1; i<=10; i++) a.Fun();

// cout << A::cnt << endl; cout << a.Cnt() << endl; return 0;

}

Cytaty

Powiązane dokumenty

Given that there are many studies of differenc- es in the consumption of space and place between classes and that these consumption patterns vary within specific segments of

There was a significant difference comparing the age group of 4–6 years and the two other groups meaning that sway velocity was significantly higher in the youngest group

The volumes of reservoir fluids expelled during compaction of 1 m 3 of Main Dolomite carbonates were estimated as 56 l in the Sieraków-4 well, 90 l in the Mokrzec-1.. well and 97 l

Asked about the ride the Superbus will provide, the chief designer says: “On the road it will give a ride like… a Superbus.. There is nothing to compare

The dissociation energies of all rotation–vibrational states of the molecular HD in the ground electronic state are calculated to a high accuracy by including nonadiabatic,

As it can be observed no empirical studies have so far addressed the role of gender in experiencing in-class speaking apprehension. The aim of this study was to examine whether

Skupiam się zatem na pewnej grupie numizmatów, która ideę Romy walczącej o odrodzenie lub odbudowę wyraża za pomocą wspomnianych legend ( ROMA RE- NASCENS lub ROMA RESVRGENS )