Is there a way to make passing by reference, and passing by value explicit in the function call?

前端 未结 7 1513
北荒
北荒 2021-02-18 13:43

If you were to look at this code,

int x = 0;
function(x);
std::cout << x << \'\\n\';

you would not be able to verify through any me

7条回答
  •  天涯浪人
    2021-02-18 13:58

    Many (most) IDE's help you with this problem by displaying the function/method prototype(s) once they figure out which function you are calling.

提交回复
热议问题