Can anyone see why the compile keeps giving me an error. It compiled before and then I went to the computer lab and changed some of the files. When I uploaded them back to my home computer the compiler keeps saying that there is a syntax error even though the lab computers compile the same code with no complaints or warnings. The compiler I am using is Dev C++ v4.9.8.0
Here is the warning:
Model.h:18: syntax error before `*'' token
Model.h
#ifndef _MYSUBDIVISION_H_
#define _MYSUBDIVISION_H_
#include <fstream>
#include <iostream>
#include "Vertex.h"
class Model
{
private:
int sub_level;
int levels_computed;
int num_vertices;
int num_faces;
std::string model_file;
Polygon ** faceList; //this is the line giving the error
Vertex ** vertexList;
public:
Model();
Model(std::string);
int loadModel();
void render();
void subdivide(bool);
void create_adjacencies();
};
#endif
Vertex.h
#ifndef _MYPOLYGON_H_
#define _MYPOLYGON_H_
#include <GL/gl.h>
#include <iostream>
static const int max_neighbors=12;
class Vertex;
class Polygon;
class Vertex
{
private:
int myid;
int num_neighbors;
double x;
double y;
double z;
double * normal;
Vertex ** neighbors;
public:
Vertex();
Vertex(int, double, double, double);
inline void setId(int newid) {myid=newid;}
inline int getId() {return myid;}
inline void render();
void setPoints(double d1, double d2, double d3);
void getPoints(double *);
void getWeightedPoints(double *, double);
void addWeight(double *);
void addNeighbor(bool, Vertex *);
void getNormal(double *);
void createNormal();
void normalize();
Vertex * evenSubdivide(int);
Vertex * oddSubdivide(int, Vertex *);
};
class Polygon
{
private:
int sub_count;
int num_neighbors;
Vertex ** points;
Vertex ** sub_point;
Polygon ** neighbors;
Polygon ** children;
public:
Polygon();
Polygon(Vertex *, Vertex *, Vertex *);
bool checkNeighbor(Polygon *);
int subdivide(int, int);
void render(int, int);
void addNeighbor(Polygon *);
void getVertices(Vertex **);
void notify(Vertex *, Vertex *, Vertex *);
};
#endif
"Give a man a fish and he will eat for a day, drown a man in the water and the fish will eat for a week!
"Pfft, Facts! Facts can be used to prove anything!" -- Homer J. Simpson