Languages

Menu
Sites
Language
result Tizen::Base::String::IndexOf ( const String & str, int startIndex, int & indexOf ) const

Can't seem to get String.IndexOf() to work.  Compiler keeps saying "no matching member function for call to 'IndexOf'"  

Here's the definition from the documentation: 

result Tizen::Base::String::IndexOf    (    const String &     str, int     startIndex, int &     indexOf  )         const

here's the code i'm trying: 

 

int i;

const String string1 = "abcdefg";

const String string2 = "bcd";

string1.IndexOf(&string2, 0, &i);

 

Responses

2 Replies
Alex Dem

Hi,
It should works, please remove the & operator which takes adress from method call:
string1.IndexOf(string2 0, i);
Alexey.

Nick Hathaway

Oh that works!  string1.IndexOf(string2, 0, i), with no address-of operators

 

Thanks