哪里错了,请指出来
#include"iostream.h"class A
{
public:
A(int i,int j);
A operator +(A c);
private:
int x,y;
};
A A::operator+(A c)
{
A h;
h.x=x+c.x;
h.y=y+c.y;
return h;
}
A::A(int i,int j)
{x=i;y=j;}
int main()
{
A D(2,3),X(7,8),G;
G=D+X;
return 0;
}
照着书本打得,还是没发现哪错了