//foo.h
class Foo
{
private:
static int number;
public:
static int bar();
};
//foo.cc
#include "foo.h"
int Foo::bar()
{
return Foo::number;
}
this is not working. I want to define a static function outside the class definition and access a static value.
undefined reference to `Foo::number'