title: C++ - How can I input strings from user into a vector string and then perform some operation on based of that?
body: <p>How do I make this work?</p>
  
  <pre><code>char stringw[];                   //to hold the data user enters and then copy it to the string vector .. I didnt know any direct method
  cin&gt;&gt;stringw;                     
  directions.push_back(stringw);    //directions is a &lt;string&gt; vector
  </code></pre>
  
  <p>How do I make such a check?<br>
  <code>if(directions[i][j])=="N")    //I am getting an error</code><br><code>"error: expected primary-expression before '==' token"</code><br></p>
  
  <p>Edit 1: <strong>Error Solved</strong> <code>if(directions[i][j])=="N")</code> should be <code>if(directions[i][j]=="N")</code> I closed the parantheses unexpectedly<br></p>
  
  <p>Now How do we add string data to string vector?</p>
  
  <p>Edit 2 : <strong><em>Solved!</em></strong></p>
  
  <p>Actually using <code>char stringw</code> is of data type char * and I am pushing <code>char *</code> into a string ... it doesn't that way.</p>