SFML community forums

Help => General => Topic started by: Fnak on July 04, 2014, 08:29:10 pm

Title: reason for the & sign
Post by: Fnak on July 04, 2014, 08:29:10 pm
I created a function that looks like this:

void Draw(sf::RenderWindow &window);

... to draw a sprite.

but I don't understand why the & sign needs to be there...
what is it for? I can't seem to find out
Title: Re: reason for the & sign
Post by: Jesper Juhl on July 04, 2014, 08:40:43 pm
It marks the variable as being a reference (http://en.m.wikipedia.org/wiki/Reference_(C%2B%2B)).
Title: Re: reason for the & sign
Post by: Fnak on July 05, 2014, 02:05:25 am
thanks