20 lines
328 B
C++
20 lines
328 B
C++
|
#include <iostream>
|
||
|
#include "Counter.hh"
|
||
|
|
||
|
using namespace std;
|
||
|
|
||
|
int main() {
|
||
|
Counter a ;
|
||
|
Counter b ;
|
||
|
|
||
|
cout << "there are now "
|
||
|
<< Counter::getCounter()
|
||
|
<< " Counter objects" << endl;
|
||
|
|
||
|
if (true) {
|
||
|
Counter c;
|
||
|
cout << " and now " << Counter::getCounter() ;
|
||
|
}
|
||
|
cout << " and now " << Counter::getCounter() << endl ;
|
||
|
}
|