Search Results - CodeGuru Forums
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: rodis

Search: Search took 0.00 seconds.

  1. Replies
    16
    Views
    3,138

    Re: STL friendly operator

    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...
  2. Replies
    16
    Views
    3,138

    Re: STL friendly operator

    OK, this is peculiar, but
    ostream& operator << (ostream& strm, const char* s)
    {
    static string tmpstr;
    tmpstr = s;
    strm << tmpstr;
    return strm;
    }
    solves the problem, so iostream...
  3. Replies
    16
    Views
    3,138

    Re: STL friendly operator

    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...
  4. Replies
    16
    Views
    3,138

    Re: STL friendly operator

    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...
  5. Replies
    16
    Views
    3,138

    STL friendly operator

    I want to overload ostream& operator << so that it prints content of whatever container I want. I wrote something like this:


    #include <iostream>
    #include <list>
    #include <set>
    template <class...
Results 1 to 5 of 5


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center