Problem of Pass by Reference in C++

A

alan

Hi All,

I have a problem on C++ pass by reference concept.

I saw some funcions which is :

e.g.
int& func(int &a)
{
.....
...
}

I understand the use of "int &a",
but I would like to know what is the use of "int&" ? and how to use it?
any examples?

Please help.
Best regards,
Alan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,156
Messages
2,570,878
Members
47,405
Latest member
DavidCex

Latest Threads

Top