When compiling this code on VS2008:
#include <vector>
using namespace std;
class Vertex {
public: double X;
double Y;
double Z;
int id; // place of vertex in original mesh vertex list
vector<Vertex*> neighbor; //adjacent vertices
vector<Triangle*> face; // adjacent triangles
float cost; // saved cost of collapsing edge
Vertex *collapse; //
};
class Triangle {
public:
Vertex * vertex[3];
};
I get the following error:
1>.\Triangle.cpp(15) : error C2065: 'Triangle' : undeclared identifier
How can I fix this?