Thursday 5 December 2019

c++ - "&" meaning after variable type







Trying to understand meaning of "&" in this situation



void af(int& g)
{

g++;
cout<}


If you call this function and pass variable name - it will act the same like normal void(int g). I know, when you write &g that means you are passing address of variable g. But what does it means in this sample?

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...