i'm just writing a small class now and i want a few vectors as private data. if i use the linethen there's no problem. But i want to declare that this vector should contain say, 32 elements, and that they are all initialise3d to 0, so i triedCode:std::vector<int> a;but it won't let me and errors with someCode:std::vector<int> a(32, 0);How can i specify the size and initial contents of the vector?Code:error C2059: syntax error : 'constant'
I don't get any errors if i use code like this in an ordinary program. Is there something special happening here cause it's in the private data section of a class?
Any ideas would be great.