You can't access type names through an instance. Write:
cl::s::getInstance();
C++ is interpreting c->s::getInstance()
as an attempt to call s::getInstance
on the object pointed to by c
. You can use this syntax when calling overridden (or hidden) member functions on a base class, or disambiguating member functions inherited from multiple base classes:
struct A { void foo(); };
struct B: A { void foo(); };
B b;
b.foo(); // calls B::foo
b.A::foo(); // calls A::foo