2 variables of the same type, 1 private in library, the other in the sketch

Hi all,
I'm pretty new to C++ and I need help for some very basic info ...

in my library I have a private variable declared as

int pin = 10;

that gets its value set through ctor injection, so I'll have another

int pin = 12;

in my sketch to set the desired value.

The compiler tells me

multiple definition of [...] first defined here

what is the problem?
in the library I did

private:
  	int pin;

shouldn't it be hidden to external code?

thank you for your help! =)

You need to post a complete example which demonstrates the problem, not just snippets of code.

in my project I have a private variable declared as

Why do you have that? You have a private member named pin. Why are you creating another variable named pin?