|
当我在first.cpp中加入int z,x,y后,然后
void first::user_button22()
{
int i=0,a;
switch ( p )
{
case '+':
z=x+y;
break;
case '-':
z=x-y;
break;
case 'x':
z=x*x;
break;
case '*':
z=x*y;
break;
case '/':
z=x/y;
break;
}
其中有+号后,编译就出现了如下错误
first.cpp:245: invalid use of member (did you forget the `&' ?)
first.cpp:245: invalid use of member (did you forget the `&' ?)
first.cpp:248: invalid use of member (did you forget the `&' ?)
first.cpp:248: invalid use of member (did you forget the `&' ?)
first.cpp:251: invalid use of member (did you forget the `&' ?)
first.cpp:251: invalid use of member (did you forget the `&' ?)
first.cpp:254: invalid use of member (did you forget the `&' ?)
first.cpp:254: invalid use of member (did you forget the `&' ?) |
|