摘要: 一般来说C++中参数传递有三种方式:值传递、指针传递、引用传递 1.值传递——传值 值传递是最常见的一种参数传递的方式,但是对初学者来说也最容易出错。如下例: #include<iostream.h> void fun(int a,int b) { int temp; temp=a; a=b; b= 阅读全文
posted @ 2025-02-07 21:19 Young-children 阅读(46) 评论(0) 推荐(0)