1#include "lib_static_init.h" 2#include <stdio.h> 3 4Foo::Foo() 5{ 6 /* increment the static variable */ 7 value = ++Foo::counter; 8 fprintf(stderr, "Foo::Foo for this=%p called (counter = %d)\n", this, counter); 9} 10 11int Foo::getValue() 12{ 13 return value; 14} 15 16int Foo::counter; 17 18Foo theFoo; 19