make indexOf compile in c++