为了账号安全,请及时绑定邮箱和手机立即绑定

c++的问题啦

c++的问题啦

C C++
西兰花伟大炮 2017-04-20 22:16:11
#include<iostream> #include<stdlib.h> using namespace std; void change(int &a,int &b); int main(void){     int x = 10;     int y = 20;     cout << x << ","<< y <<endl;     change(x,y);     cout << x << "," << y <<endl;     system("pause");     return 0; } void change(int &a,int &b){     int c = 0;     c = a;     a = b;     b = c; }为什么在main函数上面还要将函数这样写一下,不然就报错
查看完整描述

目前暂无任何回答

  • 0 回答
  • 0 关注
  • 1272 浏览

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号