> Because it says it is in line 3 in main.cpp.
that is not what you've posted
Error 2 error C2447: '{' : missing function header (old-style formal list?) |
don't see anything about line number or file.
So I guess that that wasn't the full error message.
If you don't understand their meaning don't go cropping parts.
If that's really all what your compiler said, then it's pure garbage. Stop using it.
Your error is in PLAYERCROSSHAIR.H when you tried to use `Texture', `Sprite' and `RenderWindow' withouth specifying that they belong to the `sf' namespace.
1 2 3
|
sf::Texture crossTex;
sf::Sprite crossSprite;
void Dibujar(sf::RenderWindow *wnd)
|
don't
using namespace
on headers, any file that includes it gets polluted.
Also, make your headers self-contained. PLAYERCROSSHAIR.H should include the relevants SFML headers, and it is missing the headers guards.