On Feb 12, 10:42 pm, "Grizlyk" <[EMAIL PROTECTED]> wrote: > 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]; } > Ageed, but why is that the issue shows up only for 32-bit compilation and not for 64-bit, the machine it was compiled on?
I'm doing it this way...its efficient although doesn't look clean :) char foo::operator [] (const int i) const{ return std::string::operator[](i);} char foo::operator [] (const int i) { return std::string::operator[] (i);} Thanks for your explanation. -Wasif _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus