Advertisement

Error C2108 in english please??

Started by July 22, 2003 01:33 PM
13 comments, last by adam17 21 years, 7 months ago
is there any other way to find out? i have set it to compile in debug mode. that is one of the errors it gives me. plus im not programming with the DX DLLs so is there another way to find out?
There''s a little thing called the debugger...
Advertisement
If you''re using Visual Studio, you would have to press the F5 key to debug it...
Looks to me like you''re trying to access past the end of the array. The lines like this:

v1 = Mesh_array[loop1].vertex[Mesh_array[loop1].face[loop2].x]->x; 


They look kinda screwy to me. Could you post the face structure? What is x? Is it an index to a vertex?

Kazade.

Hyperdev

"To err is human, to really mess up requires a computer"
"To err is human, to really mess up requires a computer"
here is the structure for the whole mesh:
struct	MESH{	int			num_vertex,				num_faces,				num_t_vertex,	//number of textured vertices				mat_id;	Vector3		*vertex;		//holds xyz values for vertices	Face		*face;			//holds 3 values for triangle vertices	Vector3		*fnormal;		//holds 3 values for face normals	Vector3		*vnormal;		//holds 3 values for vertex normals};and here is the structure for Vector3 (my own vector class)   struct Vector3{	Vector3() {}	Vector3(float X, float Y, float Z)	{	x = X; y = Y; z = Z;}		Vector3 operator-(Vector3 vector)	{ return Vector3( x - vector.x, y - vector.y, z - vector.z);}		Vector3 operator+(Vector3 vector)	{ return Vector3( x + vector.x, y + vector.y, z + vector.z);}		Vector3 operator=(Vector3 vector)	{ return Vector3( x = vector.x, y = vector.y, z = vector.z);}		float	x, y, z;};

and the face structure:
struct Face{	Face() {}	int x, y, z;};  

i hope this helps out.

ps. if anyone sees any place for optimization (which i doubt) let me know.

[edited by - adam17 on July 23, 2003 9:33:46 PM]

This topic is closed to new replies.

Advertisement