Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: reason for the & sign  (Read 1315 times)

0 Members and 1 Guest are viewing this topic.

Fnak

  • Newbie
  • *
  • Posts: 22
    • View Profile
reason for the & sign
« 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

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: reason for the & sign
« Reply #1 on: July 04, 2014, 08:40:43 pm »
It marks the variable as being a reference.

Fnak

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: reason for the & sign
« Reply #2 on: July 05, 2014, 02:05:25 am »
thanks