[Error] no match for 'operator>>' (opera
#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')
求大神解答
相关推荐
PHP8.0新功能之Match表达式的使用
主要介绍了PHP8.0新功能之Match表达式的使用,文中通过示例代码以及图文介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面来一起学习学习吧
yum install dkms出现No match for argument: dkms和Error:Unable to find a match: dkms的解决方案
本文主要介绍了yum install dkms出现No match for argument: dkms和Error:Unable to find a match: dkms的解决方案,希望能对学习Linux的同学们有所帮助。 文章目录 1. 问题描述 2. 解决方案
meteor-match-mongo:使用 check() 和 Meteor.match() 将对象与 mongo 选择器匹配
匹配 Mongo 使用 check() 和 Match.test() 将对象与 mongo 选择器匹配 用法 安装此软件包后,您可以使用内置的check()和Match.test()函数check()对象是否与Mongo选择器匹配。 像这样使用: check ( obj , Match . Mongo ( selector ) ) ; //throws an error if obj doesn't match selector Match . test ( obj , Match . Mongo ( selector ) ) ; //returns true or false 后者还有一个速记,称为Match.testMongo() : Match . testMongo ( obj , selector ) ; //returns true or false 还有Mo
template_match.rar
template_match实现了模板匹配的功能。结果很好。可以试试用啊!!
Quartus II 调试Error和Warning及解决办法
Quartus II 调试Error和Warning及解决办法


新手乐园
