这样读多个文件对吗?# Programming - 葵花宝典
f*u
1 楼
ifstream in;
string filename[2] = {"a.txt", "b.txt"};
while (in) {
int j;
in.open (filename[j], ios::in);
j++;
}
编译错误。请问我错在哪里了?
string filename[2] = {"a.txt", "b.txt"};
while (in) {
int j;
in.open (filename[j], ios::in);
j++;
}
编译错误。请问我错在哪里了?