Possible Duplicate:
How are static variables with the same name in different functions identified by the System?
How does compiler make the difference between two local static variables that have the same name, but are defined in two different (static) member functions?
class Type
{
public:
static void fun()
{
static bool sameName = false;
// work with sameName
}
static void moreFun()
{
static bool sameName = false;
// work with sameName
}
};
it has to do with scope.
the sameName exists in two different scopes / in this case two function scopes
so internally the variables maybe are referred to with names fun.sameName and moreFun.sameName (names just arbtitrary invented by me but show the principle).