小编And*_*rew的帖子

Pass by address of value in C

I know the following is an example of pass by reference in C++, input is passed as a reference:

void add(int &input){
 ++input;
}
Run Code Online (Sandbox Code Playgroud)

I also know pass by reference is not available in C. My question is, does the above syntax mean something else in C (i.e pass by value or something), or is it meaningless? Trying to compile it in C gives this error:

error: parameter name omitted
Run Code Online (Sandbox Code Playgroud)

c

3
推荐指数
1
解决办法
73
查看次数

标签 统计

c ×1