D
Donkeylung
I have a base class which has a protected member:
map<mstring,mstring>
mstring is a derived class from std::string, which includes some
functionality to cope with MFC.
It works fine in the base class, but when I try to use it in a derived
class, it gives me an error message.
C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\functional(139): error C2678: binary '<' : no operator
found which takes a left-hand operand of type 'const mstring' (or there
is no acceptable conversion)
In my class there is an operator < overload. I took that out to see it
that could be the problem, but I get the same message. I then tried a
test map<string,string> and I get the same message. I tried messing
with map < mstring, mstring > (adding the spaces, because sometimes
with a template of containers VC++ needs certain spaces). Nothing.
The funny thing is that if I use the mfc CString class instead, it
works, but I don't want to redo the extra functionality deriving from
CString.
Any help?
Thanks,
Jay
map<mstring,mstring>
mstring is a derived class from std::string, which includes some
functionality to cope with MFC.
It works fine in the base class, but when I try to use it in a derived
class, it gives me an error message.
C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\functional(139): error C2678: binary '<' : no operator
found which takes a left-hand operand of type 'const mstring' (or there
is no acceptable conversion)
In my class there is an operator < overload. I took that out to see it
that could be the problem, but I get the same message. I then tried a
test map<string,string> and I get the same message. I tried messing
with map < mstring, mstring > (adding the spaces, because sometimes
with a template of containers VC++ needs certain spaces). Nothing.
The funny thing is that if I use the mfc CString class instead, it
works, but I don't want to redo the extra functionality deriving from
CString.
Any help?
Thanks,
Jay