为什么程序中提取运算符会报错呢?
#include<iostream>#include<fstream>
#include<cstdlib>
using namespace std;
int main()
{
string str;
char data;
char oneChar;
ifstream fin;
fin.open("a.txt");
for (int i = 0; i < 12; i++)
{
fin.get(oneChar);
cout << oneChar;
}
fin.getline(data, sizeof(data));
cout << data << endl << endl;
fin >> str;
while (!fin.eof())
{
cout << str << endl;
fin >> str;
}
fin.close();
system("pause");
return 0;
} 说得很明白了,操作类型不一样。 举例来说,就是你要搞 人和狗配种
页:
[1]