I am relatively new to c++ and I am trying to create a struct accessible from multiple c++ files. To do so, I am writing it in a header file. However, the struct requires identifiers from a DirectX library, namely "xnamath.h".
My struct is as follows
struct Vertex
{
Vertex(){}
Vertex(float x, float y, float z,
float u, float v)
: pos(x,y,z), texCoord(u,v){}
XMFLOAT3 pos;
XMFLOAT2 texCoord;
};
I have tried including the xnamath header file in my resource.h header file but this led to more errors than the current problem. The struct is required by all files and so cannot be redefined in each .cpp file, as far as I am aware.
Any help will be greatly appreciated, Thank you people!