I have a class structure :

```
A <- B

```

where A is base class and B is the derived one.
Some independent code creates object of both these classes. 
A has a static variable (lets say 'static\_a') which is used in A as well as B.

Where should I define this static\_a ? When I define that in A.h, it gives me linker error saying multiple definition.
Then I moved it to A.cc file, and compilation passes. But, I am confused whether the class B (which is defined in B.h and B.cc, which doesnt see the definition in A.cc) will get the correct values defined for the variable static\_a, as it is defined in A.cc ??

Thanks for the help!