Original Post
hi guys, this concerns an issue with operator overloading. in my vector class, i tried setting overloaded operators for the array index and for casting. however, i cant seem to have both at the same time. sample:
const float operator [] ( const long &index ) const; operator float*() const;now the error i get says i have 2 ambiguous definitions for the [] operator. it seems to make sense since the array index operator is usually interpreted as a pointer too. but the difference between the operators lies in that one takes a parameter and the other doesn't. yet the code won't compile. if i leave only one and not the other (doesnt matter which one) then it works. i use MSVC6. so it could be a compiler problem. i checked the msdn for the reported error and the example case provided does not coincide with mine entirely. help is appreciated. thanx. [edited by - crazee on April 21, 2003 1:07:50 PM]