[solved]annoying c++ issue.

I know this is javagaming.org but would one of you be able to help me with this annoying issue.
I am trying to use a namespace from one class in another class ive defined it within a header

namespace a { int d; };

this is defined within source two as

namespace a {
int d = 5;
};

however I get duplicate definitions.

When I remove the int d from the namespace it dosnt work.
its probably a simple mistake if someone could help with it.