Problems with static const class members
For some reason the following code gives me a "syntax error before numeric constant" error on compile in dev-c++
even though this code compiles with no errors
class Heuristic // abstract
virtual int distanceFromOptimal(State* b) = 0;
virtual int optimalValue() = 0;
virtual int optimalDirection() = 0;
const static int INFINITY;
static const int INCREASE;
static const int DECREASE;
Anyone got any ideas why?
const static string STATE_TYPE; // to identify problem specific states
Also I've read in my c++ book that static variables have only file scope at most, does this affect class members in any way?