Hi, I'm trying to use extern for a struct.
The struct is for vertices and is first used in a vertex class
Basicly I'm making vertex objects in the first class and in the second class I want to pass those objects (in a loop), to do calculations on them. I think if I'm trying to pass a pointer to a whole vertex instance at once , then I also need the same type to "recieve" the data? What I'm actrually trying to pass is a VertexClass->vertex[n].
float x, y, z;
void MakeVertices(int howmany);//make vertices
//trying to use extern of above vertex struct
extern vertex *DataForVertex;
//I'm trying to pass one of the vertice structs from the other
//class into this
void MakeVertex()//initialise the external vertex
void GetVertexData(vertex *data)//get data from the vertices in above class
I have tried this but I get an undefined variable error for the vertex struct.
Can any one help me with this?