I'm wanting to pass the position of the mouse in X and Y coordinates as a arguments in a function. I thought the easiest way would be to use Event::MouseMoveEvent(), so I wrote this code:
if(Event.Type == sf::Event::MouseMoved)
HandleMouse(sf::Event::MouseMoveEvent.X, sf::Event::MouseMoveEvent.Y);
This is in the main program loop. However, when I try to run the program, it gives me the error on the line HandleMouse is on:
" error: expected primary-expression before ' . ' token "
I assumed capturing the mouse coordinates was the purpose of MouseMoveEvent. Could someone,
A. Tell me what's wrong with this code, or
B. If MouseMoveEvent isn't the right function, point me to another function that suits my needs.[/quote]