Strange type in c++
Posted
by
Cemre
on Stack Overflow
See other posts from Stack Overflow
or by Cemre
Published on 2012-07-07T15:06:23Z
Indexed on
2012/07/07
15:15 UTC
Read the original article
Hit count: 146
I have a method with the prototype:
bool getAssignment(const Query& query, Assignment *&result);
I am a bit confused about the type of the second param (Assignment *&result) since I don't think I have seen something like that before. It is used like:
Assignment *a;
if (!getAssignment(query, a))
return false;
Is it a reference to a pointer or the other way around ? or neither ? Any explanation is appreciated. Thanks.
© Stack Overflow or respective owner