title: How to store a string with multiple whitespaces c++
body: <p>My program is supposed to take in some input such as "Hi there." or "I have an a." (notice the ending dot) and output "yes" if the string contains an "a" or "no" if it doesn't.
  The problem is that cin skips whitespaces and noskipws doesn't seem to work. </p>
  
  <p>The code I've got:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  using namespace std;
  
  
  int main() {
      string sequence;
      cin &gt;&gt; noskipws &gt;&gt; sequence;
  
      for (auto c : sequence) {
          if (c == 'a') {
              cout &lt;&lt; "yes" &lt;&lt; "\n";
              return 0;
          }
      }
      cout &lt;&lt; "no" &lt;&lt; "\n";
  }
  
  Input: "where are you."   Output: nothing
  Input: "what."            Output: yes
  </code></pre>