C++ what is wrong with this function
<pre><code>void webparser(const string siteurl,string filename)
{
    stringstream ss;
    ss &lt;&lt; "lynx -dump '" &lt;&lt; siteurl &lt;&lt; "'" &gt; filename;
    system(ss.str().c_str());
}
</code></pre>

<p>How do I use filename instead of file.txt in the above example?</p>

<p>Initially my line for ss was</p>

<pre><code>    ss &lt;&lt; "lynx -dump '" &lt;&lt; siteurl &lt;&lt; "' &gt; file.txt";
</code></pre>

<p>But I decided to change it to use the value from a parameter, so I added filename. </p>

<p>Below is my error message</p>

<pre><code>main.cpp: In function ‘void webparser(std::string, std::string)’:
main.cpp:244:46: error: no match for ‘operator&gt;’ in ‘std::operator&lt;&lt; [with _Traits = std::char_traits&lt;char&gt;]((* &amp; std::operator&lt;&lt; [with _CharT = char, _Traits = std::char_traits&lt;char&gt;, _Alloc = std::allocator&lt;char&gt;]((* &amp; std::operator&lt;&lt; [with _Traits = std::char_traits&lt;char&gt;]((* &amp; ss.std::basic_stringstream&lt;char&gt;::&lt;anonymous&gt;.std::basic_iostream&lt;char&gt;::&lt;anonymous&gt;), ((const char*)"lynx -dump \'"))), (* &amp; siteurl))), ((const char*)"\'")) &gt; filename’
main.cpp:244:46: note: candidates are:
/usr/include/c++/4.6/bits/stl_pair.h:220:5: note: template&lt;class _T1, class _T2&gt; bool std::operator&gt;(const std::pair&lt;_T1, _T2&gt;&amp;, const std::pair&lt;_T1, _T2&gt;&amp;)
/usr/include/c++/4.6/bits/stl_iterator.h:303:5: note: template&lt;class _Iterator&gt; bool std::operator&gt;(const std::reverse_iterator&lt;_Iterator&gt;&amp;, const std::reverse_iterator&lt;_Iterator&gt;&amp;)
/usr/include/c++/4.6/bits/stl_iterator.h:353:5: note: template&lt;class _IteratorL, class _IteratorR&gt; bool std::operator&gt;(const std::reverse_iterator&lt;_IteratorL&gt;&amp;, const std::reverse_iterator&lt;_IteratorR&gt;&amp;)
/usr/include/c++/4.6/bits/basic_string.h:2547:5: note: template&lt;class _CharT, class _Traits, class _Alloc&gt; bool std::operator&gt;(const std::basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp;, const std::basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp;)
/usr/include/c++/4.6/bits/basic_string.h:2559:5: note: template&lt;class _CharT, class _Traits, class _Alloc&gt; bool std::operator&gt;(const std::basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp;, const _CharT*)
/usr/include/c++/4.6/bits/basic_string.h:2571:5: note: template&lt;class _CharT, class _Traits, class _Alloc&gt; bool std::operator&gt;(const _CharT*, const std::basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp;)
/usr/include/c++/4.6/bits/stl_iterator.h:842:5: note: template&lt;class _Iterator, class _Container&gt; bool __gnu_cxx::operator&gt;(const __gnu_cxx::__normal_iterator&lt;_Iterator, _Container&gt;&amp;, const __gnu_cxx::__normal_iterator&lt;_Iterator, _Container&gt;&amp;)
/usr/include/c++/4.6/bits/stl_iterator.h:836:5: note: template&lt;class _IteratorL, class _IteratorR, class _Container&gt; bool __gnu_cxx::operator&gt;(const __gnu_cxx::__normal_iterator&lt;_IteratorL, _Container&gt;&amp;, const __gnu_cxx::__normal_iterator&lt;_IteratorR, _Container&gt;&amp;)
make: *** [main.o] Error 1
</code></pre>
