title: How to get line separated with spaces to store user address
body: <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  
  using namespace std;
  int main()
  {
      string emailAddress, computerTyp, temp;
      std::string address;
      cout &lt;&lt; &quot;ITSx IT Solutions\n&quot; &lt;&lt; endl;
      cout &lt;&lt; &quot;enter your email address : &quot; &lt;&lt; endl;
      cin &gt;&gt; emailAddress;
      std::cout &lt;&lt; &quot;enter address : &quot; &lt;&lt; std::endl;
      
      //getline(cin, address);
      //cin &gt;&gt; address;
      for (int i = 0; i &lt; 2; i++)
      {
          while (std::cin &gt;&gt; temp)
          {
              getline(std::cin, temp, ' ');
              // use x
              address += temp;
          }
      }
  
  
  
      //cin &gt;&gt; address;
      cout &lt;&lt; &quot;Enter the type of computer you need  : &quot;&lt;&lt; std::endl;
      cin &gt;&gt; computerTyp;
      cout &lt;&lt; &quot;Email Address : &quot; &lt;&lt; emailAddress &lt;&lt; &quot; Address : &quot;&lt;&lt; address &lt;&lt; &quot; Computer Type : &quot; &lt;&lt; computerTyp &lt;&lt; endl;
      return 0;
  }
  </code></pre>
  <p>I Want To Get To Get Line Separated With Spaces From User Input. And Display It On The Console.</p>
  <p>So Whenever I Try To Add Address It Skips That Line And Goes To Computer Types Option I</p>