Ver Mensaje Individual
  #5 (permalink)  
Antiguo 21/05/2011, 08:52
tawky
 
Fecha de Ingreso: noviembre-2009
Mensajes: 36
Antigüedad: 14 años, 5 meses
Puntos: 0
Respuesta: Problema con Static

Bueno ahora que tengo el código delante lo pego:

objetos.h

class _car: public _triangles_object3D
{
public:

_car();
//void draw(int puntos,int caras,int ajedrez);
void drawC(_tipoDibujo Draw_type,int Punto);

protected:
_cube Cube;
_wheel rueda;
_cone Light;
};

class turismo
{
public:

turismo();
void colocar(float x, float y, float z, float s);
void Pintar(_tipoDibujo Draw_type,int Punto);

_car cocheunico;
static int aaax;
static _car coche2;

//_car *miturismo;
int x, y ,z;
float escala;
int gasolina;
_vertex3f Posicion;
};

objetos.cc

turismo::turismo()
{

}

void turismo::colocar(float x, float y, float z, float s)
{
Posicion.x=x;
Posicion.y=y;
Posicion.z=z;
escala=s;
}

void turismo::Pintar(_tipoDibujo Draw_type,int Punto)
{
glPushMatrix();
glTranslatef(Posicion.x,Posicion.y,Posicion.z);
//glScalef(escala, escala, escala);
aaax=6;
coche2.drawC(Draw_type,Punto);
cocheunico.drawC(Draw_type,Punto);
glPopMatrix();
}

El error lo da en coche2.drawC(Draw_type,Punto);

objetos.o: In function `turismo::Pintar(_tipoDibujo, int)':
/home/tawky/objetos.cc:825: undefined reference to `turismo::coche2'
collect2: ld returned 1 exit status