[英]I don't understand result
I thought result will be int parameter a : 3 3我认为结果将是 int 参数 a : 3 3
but result was但结果是
why result is it?结果是为什么?
Where you call "cout << "int\\t" << TestFunction(3) << endl;"你在哪里调用“cout <<”int\\t” << TestFunction(3) << endl;” it needs to evaluate the function call first, before it can print out "int\\t (returned value)" The only way it will know what to print out is by running the function.
它需要先评估函数调用,然后才能打印出“int\\t(返回值)”。它知道要打印什么的唯一方法是运行该函数。 When the function runs, it prints out "paramater a :".
当函数运行时,它会打印出“paramater a :”。 The three is then returned, and the second cout statement can be performed: (int\\t)
然后返回三个,就可以执行第二条cout语句了:(int\\t)
Ready steps准备步骤
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.