I'm getting two errors when trying to compile this function:
sf::Rect<float>* DeriveRect(sf::Shape* shape)
{
sf::Rect<float>* rect(shape->GetPointPosition(0).x,
shape->GetPointPosition(0).y,
shape->GetPointPosition(3).x,
shape->GetPointPosition(3).y); /* The errors bring me to this line */
return rect;
}
The errors:
error: initializer expression list treated as compound expression
error: cannot convert 'const float' to 'sf::Rect<float>*' in initialization
I get the feeling that these are simple errors, but I could be wrong.
More information:
OS: Mac OS X 10.5
Compiler: g++
IDE: XCode 3
I have not called this function anywhere in the other parts of the program yet.
This is my first time with SFML.
Could anybody help me out with this?
Thanks,
Jordy