试将下列程序中的指针改为引用:
//===================================
#include<iostream>
using namespace std;
//-----------------------------------
void mySwap(int* a, int* b);
//-----------------------------------
int main(){
int a=16, b=48;
cout<<"a ="<<a<<",b= "<<b<<endl;
mySwap(&a,&b);
cout<<"After Being Swapped: \n";
cout<<"a ="<<a<<", b="<<b<<endl;
}//----------------------------------
void mySwap(int* a, int* b);{
int temp =*a;
*a = *b;
*b = temp;
}//================================== 
//=================================== //EX0307.cpp //----------------------------------- #include<iostream> using namespace std; //----------------------------------- void mySwap(int& a, int& b); //----------------------------------- int main(){ int a=16, b=48; cout<<"a ="<<a<<",b= "<<b<<endl; mySwap(a, b); cout<<"After Being Swapped: \n"; cout<<"a ="<<a<<", b="<<b<<endl; }//---------------------------------- void mySwap(int& a, int& b);{ int temp =a; a = b; b = temp; }//==================================