俺是个新手,大哥们帮帮忙啊!!!
#include<iostream>
using namespace std;
struct Point{
private:
double x,y;
public:
Point(){};
Point(double a,double b)
{x=a;y=b;}
void Display(){cout<<x<<"\t"<<y<<endl;}
};
void main(){
Point a;
Point b(18.5,10.6);
a.Setxy(10.6,18.5);
a.Display();
b.Display();
}
E:\学习\Microsoft Visual Studio\Common\451\5666.cpp(15) : error C2039: 'Setxy' : is not a member of 'Point'
E:\学习\Microsoft Visual Studio\Common\451\5666.cpp(3) : see declaration of 'Point'
执行 cl.exe 时出错.