我希望能够在main之前初始化一个大小为'SIZE'的向量。通常情况下,我会做 static vector<int> myVector(4,100);
int main() {
// Here I have a vector of size 4 with all the entries equal to 100
}
但问题是,我想初始化向量的第一个项目是有一定价值,以及其他
对不起,如果这个问题在这里似乎很微不足道。 在C++代码中有如下的内容: class Foo
{
public:
static int bands;
...
...
private:
...
...
}//class definition ends
int Foo::bands; //Note: here its not initia