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

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -