void test08(){
vectortmp;
vectortmp_test01, tem_test02;
tmp_test01.reserve(100);
tmp_test02.
for (int i = 0; i < 5; i++)
{
tmp.push_back(i);
cout << tmp[i] << endl;
}
cout << tmp.back() << endl;
}
是tem_test02,不是tmp_test02
tem_test02写错了,写成tmp_test02,改掉就好了
void test08(){
vectortmp;
vectortmp_test01, tmp_test02;
tmp_test01.reserve(100);
tmp_test02.reserve(100);
for (int i = 0; i < 5; i++)
{
tmp.push_back(i);
cout << tmp[i] << endl;
}
cout << tmp.back() << endl;
}
我的回答怎么没有了