Sry for being stupid
. Although, you should change that.
Is that the whole error message? And is that the code you are using?
I tried to run that on my comp, you are missing a closing bracket on the line
grass.setTextureRect(IntRect(0,0,45,45);
Also,
according to the documentation there is no such method: "sf::Sprite setX()".
But the main error you are talking of seems to be somewhere else. Did you try to remove the other errors? Which IDE are you using, Visual Studio?