// file objparse.h
#ifndef OBJPARSE_H
#define OBJPARSE_H
class OBJParser: public FileParser {
private:
int selected;
const char* cs;
struct VertexStruct {
float x, y, z;
float t, u;
float nx, ny, nz;
};
struct IndexStruct {
int tIndices;
};
std::vector<VertexStruct> Vertex;
public:
void readVertices(std::vector<VertexStruct>&);
};
#endif
Parse errors where syntax appears correct
This file is giving me a lot of "parse error before x token" messages when I try to compile, and I've tried isolating a lot of things to get it working again. I just had the code exactly like this before and it won't compile anymore. Cleaning the compile target didn't work either.
The first error is on line 6, where the class OBJParser is being declared. It says that there's a parse error before '{'. Because of this it mentions OBJParser being undefined in other places, and that there's a forward declaration of OBJParser on this file. This is the only file where the class is declared.
The error could be in the header file included directly before this one.
Look in the compiler output to see which CPP file is producing the error, then look at which header is included directly before this one.
Look in the compiler output to see which CPP file is producing the error, then look at which header is included directly before this one.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement