Tom*_*ski 2 c++ arrays string return
我有功能:
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;
}
Run Code Online (Sandbox Code Playgroud)
但我想返回字符串数组:
line[]
我怎样才能做到这一点?
| 归档时间: |
|
| 查看次数: |
9922 次 |
| 最近记录: |