Reputation: 61
I have been trying for the last 20 minutes figuring out why it is throwing this error..
#include <GL/glut.h>
#include <vector>
// global width and height
int GW;
int GH;
// current mouse position in pixel coordinate
int x;
int y;
typedef struct myTriangle {
float tx;
float ty;
} myTriangle;
vector<myTriangle> container;
The code throws this:
Transform.cpp:17: error: expected constructor, destructor, or type conversion before '<' token
Upvotes: 1
Views: 1171
Reputation: 351
Looks to me like you haven't specified the vector's namespace and haven't declared that you are using std::vector. Try this instead:
std::vector<myTriangle> container;
Upvotes: 5