vectorMyModel* MyMesh::vModel // static
#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
Why do you use a static at all? You should give that a try:
and then:
#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
Popular Topics
Advertisement