void func(int &a) { //函数功能 }
在C语言无法这样使用,所以需要改为地址引用:
void func(int *a) { //函数功能 }
int num=10; //...... func(&num); //......