static StupidClass foo;
By making foo static, an instance is created for each module (source file). If you want only one foo (a singleton) declare it extern in the header file...
[glow]extern [/glow]StupidClass foo;
And define a single instance in one module (source file)...
StupidClass foo;