In work, I have to call two classes with the same name in two different dlls. But I don't know which class is instantiated.
For example:
FolderA/C.h
class__desllpec(export) C{}
FolderB/C.h
class__desllpec(export) C{}
main.h
int main(){
C c; //
}
My question is:
- Which class will be instantiated?
- What shall I do if I want to instantiated one class?
Thanks for you help.
I've read the question Calling two functions with the same name from two different C DLLs and I am not sure the answer is out of date.
Update:
Answer from comments:
- use namespace in the headers.
- use
LoadLibrary()
and GetProcess()
to get specific functions.
But I can not figure out which class will be instantiated and why.