I am currently programming on a 3d visualization program so I wrote my own Vector3 class to have some convenient vector operations. That worked fine until I needed to load some Meshes which I used an external library for that has its own Vector3 class. Now the compiler can’t tell them apart and I can not change both because they are too heavily included in the code.
Has anyone an idea how I can separate them for the compiler?
I thought about creating a namespace around the inclusion of the loader but got errors in the libraries implementation.
Any Ideas would be appreciated.
EDIT
Unfortunately my own project as well as the library have no own namespace.
(Solved)
Ok I solved this by removing the library and refactoring my code automatically with eclipse. But if it would not be able to do this how could I solve this problem in C++ independent from the IDE? -> Not marked as answered
The solution is obvious. Put your project in a namespace. And refer to the Vector3 in the library with ::Vector3, if it truly does not have any namespace.