Well i found out the solution. In the begining of the main.cpp i do the following in Linux: float x=2.0, y=6.0f, z=1.5; Cone cone1(Vertex3d(10*x, 0, 10*z, 100), 1, Vertex3d(10*x, 0, 10*z+5, 2),0.00); Cone cone2(Vertex3d(9*x, 0, 9*z, 100), 0.7, Vertex3d(9*x, 0, 9*z+3, 2),0.00); ...
In VC++ i did: float x=2.0, y=6.0f, z=1.5; Cone cone1(*(new Vertex3d(10*x, 0, 10*z, 100)), 1, *(new Vertex3d(10*x, 0, 10*z+5, 2)),0.00); Cone cone2(*(new Vertex3d(9*x, 0, 9*z, 100)), 0.7, *(new Vertex3d(9*x, 0, 9*z+3, 2)),0.00); ... and it worked...
Maybe gcc is a bit "smarter" (?) with the initializations...
I don't think so. You probably has a problem in the Vertex3d copy constructor. The code above (VC++) is creating a memory leak, and is wrong. Everything you create with new must be destroyed with delete. Since you are using dereference operator (*) you are losing the pointer to the object, and you cannot delete anymore (at least not with some unusual tricks). Try doing a Vertex3d a; Vertex3d b = a and see if it works. []s Davi de Castro Reis