I have a class that has a static member, which I want to use in the class constructor, but the code doesn\'t compile, and I\'m left with these errors:
fat
alternatively, if you don't want to put that line in a cpp file, you can use a static method which returns a reference to a static instance... i.e.
class A
{
public:
  static Collection& collection()
  {
    static Collection singleInstance;
    return singleInstance;
  }
};