McZ
12-19-2000, 11:58 PM
please help me someone ! Iīm going crazy or something..
I have created som classes and I got a error that I have look and read about for about 1000 times or somthing but I canīt understand how I would fix it. I hope anyone of you could explain to me how I could do it http://www.opengl.org/discussion_boards/ubb/smile.gif
to the problem:
this are my classes:
struct OGL_Vertex {
GLfloat x;
GLfloat y;
GLfloat z;
};
class OGL_Object {
int NrVertices;
OGL_Vertex Vertices[50];
void AddTriangle(OGL_Vertex v1, OGL_Vertex v2, OGL_Vertex v3);
};
this is my addtriangle function:
void OGL_Object::AddTriangle(OGL_Vertex v1, OGL_Vertex v2, OGL_Vertex v3)
{
/* some other code */
for (i=0; i<NrVertices; i++)
{
if(Vertices[i] == v1) <--- there is the error
{
do something
}
}
the error I get is somthing like this: left-hand operation not allowed.
I donīt remember exact and I am not at home so I canīt check! but I hope someone understans and can help me with this.
I have created som classes and I got a error that I have look and read about for about 1000 times or somthing but I canīt understand how I would fix it. I hope anyone of you could explain to me how I could do it http://www.opengl.org/discussion_boards/ubb/smile.gif
to the problem:
this are my classes:
struct OGL_Vertex {
GLfloat x;
GLfloat y;
GLfloat z;
};
class OGL_Object {
int NrVertices;
OGL_Vertex Vertices[50];
void AddTriangle(OGL_Vertex v1, OGL_Vertex v2, OGL_Vertex v3);
};
this is my addtriangle function:
void OGL_Object::AddTriangle(OGL_Vertex v1, OGL_Vertex v2, OGL_Vertex v3)
{
/* some other code */
for (i=0; i<NrVertices; i++)
{
if(Vertices[i] == v1) <--- there is the error
{
do something
}
}
the error I get is somthing like this: left-hand operation not allowed.
I donīt remember exact and I am not at home so I canīt check! but I hope someone understans and can help me with this.