Getting error: no match for operator <<, when using operator ++ concurrently
<p>I'm trying to overload many operators for a class assignment and need to get the &lt;&lt; and ++ operators working together. Below is a sample of the code I'm dealing with. Let me know if you have any ideas.</p>

<p>decaring generic template  </p>

<pre><code>template (class T)  
class Vector 
{  
    public: 

    class VectIter
    {
        friend class Vector;
        private:
            Vector&lt;T&gt; *v; // points to a vector object of type T
            int index;    // represents the subscript number of the vector's
            // array.
        public:
            VectIter(Vector&lt;T&gt;&amp; x);
            T operator++();
            T operator++(int);
            T operator--();
            T operator--(int);
            T operator *();

            friend ostream&amp; operator &lt;&lt;(ostream&amp; out, const VectIter&amp; rhs)
            {
                out &lt;&lt; (*rhs) &lt;&lt;endl;
                return out;
            }
    };

    Vector(int sz); 
    ~Vector();

    T &amp; operator[](int i); 
    void ascending_sort();

    private:
        T *array;              // points to the first element of an array of T
        int size;
        void swap(T&amp;, T&amp;);
};
</code></pre>

<p>and here is where the error occurs in the main:</p>

<pre><code>Vector&lt;Mystring&gt; y(3);
y[0] = "Bar";
y[1] = "Foo";
y[2] = "All";;

Vector&lt;Mystring&gt;::VectIter iters(y);

cout &lt;&lt; "\n\nTesting Postfix --";
for (int i=0; i&lt;3 ; i++)
    cout &lt;&lt; endl &lt;&lt; (iters++);
</code></pre>

<p>Here is a sample of the operators I'm using:</p>

<pre><code>T Vector&lt;T&gt;::VectIter::operator ++()  
{  
    if(index == (*v).size)  
        index = 0;  
    else  
        index++;  
    return (*v).array[index];  
}

T Vector&lt;T&gt;::VectIter::operator ++(int post)  
{  
    post = index;  
    if(index == (*v).size)  
        index = 0;  
    else  
        index++;  
    return (*v).array[post];  
}
</code></pre>

<p>This code seems to work with int variables but when I change it to my custom class Mystring I get the error.</p>
