この質問に答えようとしている間は、より具体的になるようにしてください。追加の詳細はありません。エラーが発生します
no match for operator<< in theFileIn<<number
#include<iostream>
#include<fstream>
using namespace std;
int main()
{
int number;
string name;
ofstream theFileOut;
ifstream theFileIn;
theFileOut.open("Sansa.txt");
cout << "Enter the number and the name"<<endl;
while(cin>> number>> name)
{
theFileOut<<number<<" "<<name<<endl;
}
theFileOut.close();
theFileIn.open("sansa.txt");
while(theFileIn>>number>>name)
{
theFileIn << number<<" "<<name<<endl;
}
return 0;
}