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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -