[Error] no match for 'operator>>' (opera
#include<iostream>
#include <string>
#include <fstream>
using namespace std;
int main()
{
ofstream output;
output.open("number.txt");
output<<95<<" "<<56<<" "<<34;
output.close();
cout<<"Done"<<endl;
ofstream input;
input.open("number.txt");
int score1 ,score2 ,score3;
input >> score1;
input >> score2;
input >> score3;
cout<<"Total score is "<<score1+score2+score3<<endl;
input.close();
cout<<"Done"<<endl;
return 0;
}
25 8 F:\c++\Dev.cpp\SimpleFileinput.cpp [Error] no match for 'operator>>' (operand types are 'std::ofstream {aka std::basic_ofstream<char>}' and 'int')
求大神解答