【发布时间】:2011-07-27 02:02:00
【问题描述】:
我有功能:
int read_file() {
ifstream file("plik");
if(!file.is_open()) {
throw -1;
}
int i = 0;
string line[MAXSIZE];
while(getline(plik, line[i])) {
cout<<line[i]<<endl;
i++;
}
return i;
}
但我想返回字符串数组:
line[]
我该怎么做?
【问题讨论】: