0

Possible Duplicate:
What are the differences between pointer variable and reference variable in C++?

Hello sometimes i see that kind of declaration

void f(int& a,...){
 }

What does & mean? Cause * is pointer, without * is object, so what is that?

Community
  • 1
  • 1
Yoda
  • 16,053
  • 60
  • 184
  • 315
  • 1
    It's a reference. http://stackoverflow.com/questions/57483/what-are-the-differences-between-pointer-variable-and-reference-variable-in-c – chris Oct 15 '12 at 22:50
  • 1
    Look at the link. In C, using a pointer was known as passing by reference, but C++ actually has references, which are sometimes a much better fit. No extra syntax, and some semantics differences as well. – chris Oct 15 '12 at 22:54
  • 2
    @RobertKilar: No, it's a pointer. You the programmer may informally refer to it as "a reference", but it's no such thing in the language. – GManNickG Oct 15 '12 at 23:14

0 Answers0