variables - The params of c++ function -


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

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -