wazz wrote: > > test.cpp: In function `int main()': > test.cpp:18: error: ISO C++ says that these are ambiguous,
Ambiguous between inherited "foo::operator[]" and "foo::operator const char*() + const_char*::operator[]" define const char foo::operator[] (const int i) const { return c_str()[i]; } or use explicit cast const char *const tmp=s; std::cout<<tmp[2]<<std::endl; -- Maksim A. Polyanin _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus