Link to home
Start Free TrialLog in
Avatar of rustycp
rustycp

asked on

error LNK2001: unresolved external symbol "public: static bool A::myvar" (?myvar@A@@2_NA)

I'm not clear on why I get that error on this piece of code:

#include "stdafx.h"

class A {
public:
      static bool myvar;
};

int _tmain(int argc, _TCHAR* argv[])
{
      A::myvar = true;
      return 0;
}

Thanks!
ASKER CERTIFIED SOLUTION
Avatar of Brendan M
Brendan M
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rustycp
rustycp

ASKER

ok simple enough...thx!