How does ODR apply to classes declared in cpp files?

88 views Asked by At

I just had strange effects in my program because of two different classes with the same name in two different cpp files of a DLL. I thought that code in cpp files does not influence code in other cpp files, but this is obviously wrong.

Is it true that because of ODR, a class name must be unique across the whole program, including all interface classes of other DLLs? I assume that non-interface classes in other DLLs have been compiled away and cannot cause trouble.

0

There are 0 answers