
作业社区
探索学习新天地,共享知识资源!
幕布斯3194744 的学生作业:
#include using namespace std; void my_swap(int &a,int &b) { int temp; temp = a; a = b; b = temp; return ; } void my_swap(float &fa,float &fb) { float temp; temp = fa; fa = fb; fb = temp; return ; } void my_swap(string &stra,string &strb) { string temp; temp = stra; stra = strb; strb = temp; return ; } int main(int argc, const char *argv[]) { int a = 10,b = 20; my_swap(a,b); cout





幕布斯3194744 的学生作业:
#include using namespace std; void my_swap_pointer(int *pa,int *pb) { int temp; temp = *pa; *pa = *pb; *pb = temp; return ; } void my_swap_quote(int &pa,int &pb) { int temp; temp = pa; pa = pb; pb = temp; return ; } int main(int argc, const char *argv[]) { int a = 100,b = 200; my_swap_pointer(&a,&b); cout




