• Create Account

Need scary sound effects or creepy audio loops for your next horror-themed game? Check out Highscore Vol.3 - The Horror Edition in our marketplace. 50 sounds and 10 loops for only \$9.99!

### #Actualgreeniekin

Posted 08 October 2012 - 12:49 PM

Never mind I worked out what was wrong.
I was not using namespace sf which is where the global function operators was declared.

I could get around it by using that name space or using the asFUNCTIONPR

asFUNCTIONPR(sf::operator +, (const sf::String &, const sf::String &), sf::String)

all that frustration for something so stupid.

With that change i get the following as an error
error: 'operator==' is not a member of 'sf::String'|


I also think the function version matches it better.

It uses this outside of the class declaration. like so
SFML_SYSTEM_API bool operator ==(const String& left, const String& right);


There must be something really stupid I am doing

https://github.com/L...stem/String.hpp

### #3greeniekin

Posted 08 October 2012 - 11:47 AM

Never mind I worked out what was wrong.
I was not using namespace sf which is where the global function operators was declared.

I could get around it by using that name space or using the asFUNCTIONPR

asFUNCTIONPR(sf::operator +, (const sf::String &, const sf::String &)

all that frustration for something so stupid.

With that change i get the following as an error
error: 'operator==' is not a member of 'sf::String'|


I also think the function version matches it better.

It uses this outside of the class declaration. like so
SFML_SYSTEM_API bool operator ==(const String& left, const String& right);


There must be something really stupid I am doing

https://github.com/L...stem/String.hpp

### #2greeniekin

Posted 08 October 2012 - 11:11 AM

With that change i get the following as an error
error: 'operator==' is not a member of 'sf::String'|


I also think the function version matches it better.

It uses this outside of the class declaration. like so
SFML_SYSTEM_API bool operator ==(const String& left, const String& right);


There must be something really stupid I am doing

https://github.com/LaurentGomila/SFML/blob/master/include/SFML/System/String.hpp

### #1greeniekin

Posted 08 October 2012 - 10:59 AM

With that change i get the following as an error
error: 'operator==' is not a member of 'sf::String'|


I also think the function version matches it better.

It uses this outside of the class declaration. like so
SFML_SYSTEM_API bool operator ==(const String& left, const String& right);


There must be something really stupid I am doing

PARTNERS