C++语言错误 C2679 二进制“>>”: 没有找到接受“overloaded-function”类型的右操作数的运算符(或没有可接受的转换)

C++语法错误
C2679 二进制“>>”: 没有找到接受“overloaded-function”类型的右操作数的运算符(或没有可接受的转换)
上网找了好久都没有找到答案,所以
我想请教一下是怎么回事,谢谢各位
visual studio2017
//头文件
#include
#include
using namespace std;
class student
{
private:
int s_score;
int a_age;
public:
int getage(int );
int getscore(int);
void display();
};

int student::getage(int z)
{
a_age = z;
return (a_age);
};
int student::getscore(int x)
{
s_score = x;
return (s_score);
};
void student::display()
{
cout<<s_score<<a_age;
};

#include
#include
#include"test.h"
using namespace std;
int main()
{
student a, b;
cin>>a.getscore>>"">>b.getage>>endl;
return 0;
}

猜你喜欢

转载自blog.csdn.net/weixin_43464469/article/details/84326250
今日推荐