NSArray replace

Post here your questions about the C++ API for SFS2X

Moderators: Lapo, Bax, MBagnati

Post Reply
bqlf1907
Posts: 25
Joined: 13 May 2013, 10:28

NSArray replace

Post by bqlf1907 »

IOS

Code: Select all

NSArray *changedVars = [evt.params objectForKey:@"changedVars"];
C++
NSArray replace what?

Code: Select all

vector<string>* changedVars = (vector<string>*)evt->Params()->at("changedVars");
is it right?
MBagnati
Posts: 126
Joined: 12 Feb 2013, 10:57

Re: NSArray replace

Post by MBagnati »

Yes, it is right.
You can use one of these statements:

Code: Select all

vector<string>* changedVars = (vector<string>*)evt->Params()->at("changedVars");
or

Code: Select all

vector<string>* changedVars = (vector<string>*)(*(evt->Params()))["changedVars"];
bqlf1907
Posts: 25
Joined: 13 May 2013, 10:28

Re: NSArray replace

Post by bqlf1907 »

thanks.
Post Reply