Huck said:
A qualified name is what combination and organization of letters,
numbers, and underscore you can use to declare a variable, function,
method, or class. To make it a qualified name, 2 things need to be
true:
1. In C++, you can use letters, digits, and underscore( _ ) in
declaring your variable name.
2. Your variable cannot start with a number.
3 examples of Qualified Names are:
myDog
my_dog
my_dog3
3 examples of Unqualified Names are:
123Dogs
1Dog1
$my_dog ( All Special Characters cannot be used except underscore )
Er, no. The first group contains unqualified names while the second
group contains "ill-formed" names - that is, names that could not be
used in a C++ program.
A "qualified" name is a (legal) name prefixed with scope operator
and usually a class or namespace name as well. Since the same name can
appear at different "scopes" in a C++ program, it is sometimes useful
to use the scope operator to "qualify" the name as the one belonging to
particular class or namespace - and not the identical name in some
other namespace or class (and which the compiler would otherwise select
if the name were not qualified.)
These are examples of qualified names:
A::b;
A::B::c
A::template X;
::a;
A qualified name always has a scope operator "::" before the name. An
"unqualfied" name has no scope operator - it's just a simple name.
Since it's not clear in which scope an unqualified name is declared, a
C++ compiler has to "look up" each unqualified name it encounters to
find a matching declaration.
Greg