当我运行此代码时,我收到以下错误:
一元'*'的无效类型参数(有'int')
我怎样才能清除这个?
#include <iostream>
#include <string>
#include <typeinfo>
using namespace std;
void multiplyFive (int &x, int y, int *z){
int d = 5 * x;
int e = 5 * y;
int f = 5 * *z;
cout << d << " " << e << " " << f << endl;
}
int main() {
int a = 2;
int *b = &a;
int &c = *b;
multiplyFive (a, b, *c);
return EXIT_SUCCESS;
}