how to split a string in c++ with Qtcreator
<p>i write this program to split string in QtCreator </p>

<pre><code>#include &lt;QtCore/QCoreApplication&gt;
#include &lt;iostream&gt;
#include &lt;istream&gt;
using namespace std;



int main()
{
string s("Somewhere down the road");
istringstream iss(s);

do
{
    string sub;
    iss &gt;&gt; sub;
    cout &lt;&lt; "Substring: " &lt;&lt; sub &lt;&lt; endl;
} while (iss);

return 0;
}
</code></pre>

<p>but it returns this error </p>

<pre><code>main.cpp:23:24: error: variable ‘std::istringstream iss’ has initializer but incomplete type
</code></pre>

<p>why? what have i do ?
is there any other easy ways ?</p>

<p>thanks</p>
