vectorMyModel* MyMesh::vModel // static

Started by
0 comments, last by mind in a box 13 years, 9 months ago

#include "MyModel"

class MyMesh
{

static vector<MyModel*> vModel; // static
}


this does not work , but got told this does

vector<MyModel*> MyMesh::vModel; // static

but how do i refer no this with push_back from main ie


#include "MyMesh"
void main
{
MyMesh::vModel.push_back(mmm);
}

but how do i refer to it please
Advertisement
Why do you use a static at all? You should give that a try:

	#include "MyModel"//Deceleration of class "MyMesh" class MyMesh{   vector<MyModel*> vModel; //not static}

and then:
#include "MyMesh"//Some little spaceshipMyMesh SpaceShip;void main(){    //Put something into the vector    SpaceShip.vModel.push_back(/*Something*/);}

This topic is closed to new replies.

Advertisement