Original Post
Hi, i've been trying for a way to solve this issue but i cant found how. Suppose i have 3 class defined in 3 different .h and .cpp files, and 2 of them are "sub-class" used by the main one, for example:
MainClass.h/MainClass.cpp
SubClass1.h/SubClass1.cpp
SubClass2.h/SubClass2.cpp
Ok, now let say i want to use the exact same structure in all those 3 class, for example a float3 struct, how can i do it? If i include it in one of the two sub class, the other sub-class dosen't have access to it, and if i save the structure in another file for example, the compiler complain that the structure is already defined elsewhere. What should i do so that i can use the structure in an entire project?
MainClass.h/MainClass.cpp
SubClass1.h/SubClass1.cpp
SubClass2.h/SubClass2.cpp
Ok, now let say i want to use the exact same structure in all those 3 class, for example a float3 struct, how can i do it? If i include it in one of the two sub class, the other sub-class dosen't have access to it, and if i save the structure in another file for example, the compiler complain that the structure is already defined elsewhere. What should i do so that i can use the structure in an entire project?