February 20th, 2012, 01:38 PM
Thanks for the support!
(However I have to disagree with monarch_dodra complaints: 1) if I wanted a different seperating sequence, I'd use a "named"' function (or try to write a iomanip-like...
February 13th, 2012, 03:05 PM
OK, this is peculiar, but
ostream& operator << (ostream& strm, const char* s)
static string tmpstr;
tmpstr = s;
strm << tmpstr;
solves the problem, so iostream...
February 13th, 2012, 01:48 PM
stl_test.cpp: In function ‘std::ostream& operator<<(std::ostream&, T)’:
stl_test.cpp:19: error: call of overloaded ‘operator<<(std::basic_ostream<char, std::char_traits<char> >&, const char*&)’ is...
February 13th, 2012, 01:27 PM
OK, why class in class T::iterator should be changed to typename? It works both ways I guess (just as one can write
template <typename T>.
I forgot to copy "using namespace std;" (it's a small...
February 13th, 2012, 11:41 AM
I want to overload ostream& operator << so that it prints content of whatever container I want. I wrote something like this: