variables - The params of c++ function -
this question has answer here:
the c function param such :
void test(int fp, int &pos){ //do something... }
but don't understand "int &pos" meant .
thank help
it means pos made reference variable variable being passed during function call(their address becomes same).ie, change in pos reflects in calling variable.for example :
if function call
test(f,p);
changes made pos reflect in p.
Comments
Post a Comment