c++ error:cannot define member function 'X:: show' within 'Y' 是怎么回事?

图片说明图片说明

在Y的定义中
friend void X::show(Y &ob);
在X的定义外面,
void X::show(Y &ob)
{
...
}