M
Mark Gilbert
Can you explain this to me? If I make a variable of type ostringstream and
do << "str", I get what I want, but if I create a temporary object of the
same type, I get a different version of operator<<.
std:stringstream os;
// This calls :perator<<(ostream &, const char *)
os << "str";
// But, this calls ostringstream:perator<<(const void *)
std:stringstream() << "str";
I am using MSVC 2005, though I think the behavior was the same with MSVC
2003.
Thanks very much,
Mark Gilbert
do << "str", I get what I want, but if I create a temporary object of the
same type, I get a different version of operator<<.
std:stringstream os;
// This calls :perator<<(ostream &, const char *)
os << "str";
// But, this calls ostringstream:perator<<(const void *)
std:stringstream() << "str";
I am using MSVC 2005, though I think the behavior was the same with MSVC
2003.
Thanks very much,
Mark Gilbert