How to make an array of strings stored in a vector
<p>I am trying something like this: </p>

<pre><code>#include &lt;iostream&gt;
#include &lt;vector&gt;
#include &lt;cstring&gt;

using namespace std;

int main()
{

    string inputStr;
    vector &lt;string&gt; strVector;
    cin.getline(inputStr,200);
    int i=0;
    while (inputStr!=NULL){ //unless all data is read.
        strVector[i]=getline(inputStr," ");
        i++;
    }//while.

    for (int j=0; j&lt;strVector.size(); j++){
        cout&lt;&lt; strVector[j];
        cout&lt;&lt;endl;
    }
} //main.
</code></pre>

<p>Any one who can help. I am trying to store my input string in <code>vector</code> string and then I can push_back my ith string.</p>
