I am trying to declare a static variable in console.h and define it in console.cpp. the line calling the variable is:
ok = CheckIoEditMinMax(0,Console::_tabsize, curpos, 0, insert,
20-Console::_tabsize,20, offset) && ok;
I have know been able to pass it, but the compiler doesn't like the way I am doing it. For example I have declared it like this:
/*Edited*/
namespace cio{
class Console{
public:
static unsigned int _tabsize; //Under public so it can be reached by the main.
//inside the console class in cio namespace
};
}
And then defined in the cpp file like this:
/*Edited - Also No it is not Const */
namespace cio{
unsigned int Console::_tabsize = 4;
}
But the compiler still doesn't like this and is saying this:
console.cpp:8:32: error: âunsigned int cio::Console::_tabsizeâ is not a
static member of âclass cio::Consoleâ
I don't Know why its doing this or even where to figure it out. Also it is a little bit odd that the compiler would say this don't you think?