OK this is total noob question:
I have simple C++ method:
void Tray::IconPos(const std::string& iconpos) {
NSRect rect = [[[status_item_ view] window] frame];
iconpos = [NSString stringWithFormat: @"%f,%f", rect.origin.x, rect.origin.y];
}
where I want std::string& iconpos
to gain this: [NSString stringWithFormat: @"%f,%f", rect.origin.x, rect.origin.y]
value.
How do I do that here?
Ninja is giving me:
tray_mac.mm:72:11: error: no viable overloaded '='
iconpos = [NSString stringWithFormat: @"%f,%f", rect.origin.x, rect.origin.y];
~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~