W
wongjoekmeu
Hello All,
I am trying to poort a code which is written in Visual C++ 6.0 to
Visual C++ in VIsual Studio .NET
I receive a problem which I simply do not understand. I was wondering
if anyone could help me out and explain me the problem I am receiving.
I have a derive class called Mystring derived from the base std::string
class.
it looks like this
---------------
class Mystring : public std::string
{
public:
----
----
bool operator ==( const std::string& rhs ) const;
bool operator ==( const Mystring& rhs ) const;
---
---
};
---------
Now when I use this operator as follow:
if( ObjectOfMystring == "Same")
---------
I receive no error when I use to compile with Visual C++ 6.0 but when I
compile with Visual C++ from Visual Studion .NET I receive the
following error:
error C2666 'Mystring:perator'==" : 3 overloads have similar
conversions
Can anyone please explain to me what this problem is about. Many thanks
in advance.
Robert
I am trying to poort a code which is written in Visual C++ 6.0 to
Visual C++ in VIsual Studio .NET
I receive a problem which I simply do not understand. I was wondering
if anyone could help me out and explain me the problem I am receiving.
I have a derive class called Mystring derived from the base std::string
class.
it looks like this
---------------
class Mystring : public std::string
{
public:
----
----
bool operator ==( const std::string& rhs ) const;
bool operator ==( const Mystring& rhs ) const;
---
---
};
---------
Now when I use this operator as follow:
if( ObjectOfMystring == "Same")
---------
I receive no error when I use to compile with Visual C++ 6.0 but when I
compile with Visual C++ from Visual Studion .NET I receive the
following error:
error C2666 'Mystring:perator'==" : 3 overloads have similar
conversions
Can anyone please explain to me what this problem is about. Many thanks
in advance.
Robert