fadfadfafsfasd / cdqpt.github.io

陈德强的博客
https://www.purethought.cn/
0 stars 0 forks source link

出参传递-引用 | ALaDing #187

Open fadfadfafsfasd opened 5 years ago

fadfadfafsfasd commented 5 years ago

https://purethought.cn/2019/09/16/%E7%BC%96%E7%A8%8B/C/%E5%87%BA%E5%8F%82%E4%BC%A0%E9%80%92-%E5%BC%95%E7%94%A8/

出参传递:一般将函数的返回值设为void或者bool,将出参放在参数中。例如:

include <iostream>

using namespace std;

bool getVal(int a, int b, int &amp