#include #include //#include using namespace std; template class Foo { T x; static int count; public: Foo() { x = 0; count += 1; } T getX(void) { return x; } int howMany(void) { return count; } static int getCount() {return count;} }; template int Foo::count = 0; int main(void) { Foo a; cout << "x in a " << a.getX() << endl; // prints 0 Foo b; cout << "how many Foo " << b.howMany() << endl; // prints 2 Foo c; cout << "how many Foo "<< Foo::getCount() << endl; // prints 1 cout << Foo::getCount() << endl; // prints 2 cout << "hello " << endl; cout << stoi("456",nullptr,10) << endl; }