"lib.h"
Expand|Select|Wrap|Line Numbers
- #ifndef LIB_H
- #define LIB_H
- #include <windows.h>
- #include <gl\gl.h>
- #include <vector>
- #include <string>
- #include <fstream>
- #include <stdio.h>
- #include <math.h>
- using namespace std;
- #include "globals.h"
- #include "functions.h"
- #include "createwindowforgl.h"
- #include "bmp.h"
- #include "draw.h"
- #include "object.h"
- #include "world.h"
- #endif
"world.h"
Expand|Select|Wrap|Line Numbers
- #ifndef WORLD_H
- #define WORLD_H
- #include "object.h"
- class WORLD
- {
- public:
- vector<OBJECT>objects;
- };
- #endif
Expand|Select|Wrap|Line Numbers
- #ifndef OBJECT_H
- #define OBJECT_H
- #include "lib.h"
- class OBJECT
- {
- struct VERTEX
- {
- float x, y, z;
- float u, v;
- };
- GLuint surface;
- vector<VERTEX> vertex;
- public:
- OBJECT(string xSurface);
- void addVertex( float x, float y, float z, float u, float v );
- VERTEX getVertex(int x)
- {
- return vertex[x];
- }
- GLuint getSurface();
- };
- #endif
'OBJECT' was not declared in this scope
ISO C++ forbids declaration of 'objects' with no type
I know the 2nd error there is because vector<OBJECT> is getting messed up so it doesn't have a type.
Any help with this would be great because I have been looking over this for a while now and it is just making me angry =(.
Thanks.