如何在 C++ 中用 1 到 10 的数字填充向量?我有这个,但它不起作用。
vector<int>test(10); test={ 1, 10 };
c++ vector
c++ ×1
vector ×1