title: Assigning Different Variables to the Input From cin C++
body: <p>In my lab I'm trying to process a line that represents a destination on Earth. An example of this is ....</p>
  
  <p>"152/N 200/E California Ave"</p>
  
  <p>In my professor's notes, he said that if you did this ...</p>
  
  <pre><code>std::cin &gt;&gt; latitude &gt;&gt; latitudeDirection &gt;&gt; longitude &gt;&gt; longitudeDirection &gt;&gt; address
  </code></pre>
  
  <p>Which consumes all the way up until California, where from there on out the string is consumed one at a time at each white space. How do I make it so I consume the rest of the input? Here's how my variables look when assigned ...</p>
  
  <pre><code>latitude = 152
  latitudeDirection = "/N"
  longitude = 200
  longitudeDirection = "/E"
  address = "California"
  </code></pre>
  
  <p><strong>address</strong> only holds "California" when I want it to hold "California Ave". Here's the code I have so far.</p>
  
  <pre><code>int numberOfLocations;
      std::cin &gt;&gt; numberOfLocations;
      std::cin.ignore();
      for (int x = 0; x &lt; numberOfLocations; x++) {
          double longitude, latitude;
          std::string longitudeDirection, latitudeDirection, address;
  
          /*
          std::cin &gt;&gt; latitude &gt;&gt; latitudeDirection &gt;&gt; longitude &gt;&gt; longitudeDirection &gt;&gt; address;
          std::cout &lt;&lt; latitude &lt;&lt; latitudeDirection &lt;&lt; latitude &lt;&lt; latitudeDirection &lt;&lt; address &lt;&lt; std::endl;
          */
      }
  </code></pre>