I fail to understand as why I get LNK1120: Unresolved externals and LNK2001: Unresolved external symbol error messages for the following code in C++
class base
{
public:
static int x;
void fun()
{
base::x = 10;
cout << base::x;
}
};
int main()
{
base b;
b.fun();
return 0;
}