In the code fragments you show here, you are not redefining anything. Moreover, you don't have the definition of the class
N::Class
, not even a
declaration of it is shown. The class
Class
is a different class,
Usb::Class
, it does not create any name clashes. That is, instead of showing
two classes
N::Class
you show
zero declarations and
zero definitions of it.
All together,
three different classes
are involved:
N::Class
(not shown anywhere);N::C
(only declaration is shown);Usb::Class
(only definition is shown).
By the way, naming some class as "Class" is pretty silly. Some name application using the word "application" in the name of .EXE file — same thing. Short names like "C" are also not acceptable. In some simple experiments, of course, it may be not important.
Chances are, you got your error message with different source code, not that you show. Anyway, your problem is somewhere else, in the code you did not show to us.
And your real problem is different. This is the ability to ask adequate questions supplying adequate information. Please pay attention for this problem.
—SA