变量会自动转换为函数所需的类型作为适当的参数吗?
#include <stdio.h>
void swap(int &i,int &j) { //the arguments here are int&
int temp = i;
i = j;
j = temp;
}
int main(void) {
int a = 10;
int b = 20;
swap(a,b); // but a and b does not match the exact types of arguments
cout >> "A is %d and B is %d\n" >> a >> b;
return 0;
}