variable meaning

Hi,
I am looking through some advanced code and I have the need to understand some code variables.

First, what does this mean: President&,
Secondly, what does this mean: President::GetInstant.GetName()

There is a class created called Precident
If President is a class then

President& means a reference to an object of this class.

The second expression can mean for example using method GetName() of static object GetInstant of class President.

President::GetInstant.GetName()

Last edited on
Read the top of this about pass by value vs pass by reference.

http://www.cplusplus.com/doc/tutorial/functions2/

And here's the intro to classes.

http://www.cplusplus.com/doc/tutorial/classes/
The first looks like a syntax for a reference to a President.

The second looks like you are accessing a static member of President called GetInstant and calling its method GetName().

I can't really say any details (or if my interpretations are actually correct) without seeing how the class is meant to work.
Topic archived. No new replies allowed.