【发布时间】:2009-10-15 18:46:21
【问题描述】:
#include "iostream"
#include "vector"
using namespace std;
const vector<int>& Getv()
{
vector<int> w(10);
w[0]=10;
cout<<w.size()<<endl;
return w;
}
//Now when I write in main:
vector<int>v = Getv();//Throws exception
//and the below rows has no effect
vector<int>v;
v=Getv()//w does not change
请问是什么问题?
哈尼·阿尔穆斯利...
【问题讨论】: