I have a class containing a static vector. I would be grateful if someone could tell me how to initialise this vector so that when this class is instantiated, the vector contains some meaningful data the first time round. NB There is only ever one instance of the class at a time, and the vector being static will hold the data that was set last time the class was instantiated.

eg in classA.h, where MaterialsClass is just a data class/structure

classA {
...
static vector<MaterialsClass> m_Vec;
};


in classA.cpp

vector<MaterialsClass> classA::m_Vec; // compiler is happy with this
classA::m_Vec.clear(); // COMPILE ERROR - syntax error ';' expected before '.'
// I want to create some MaterialsClass objects and do
// m_Vec.push_back(...)

classA::classA()
{
}

other classA functions etc