title: Read text file char by char
body: <p>I've tried code from several other questions/tutorials, always getting whitespace or nothing back.</p>
  
  <p>in.txt:</p>
  
  <pre><code>a
  z
  </code></pre>
  
  <p>main.cpp:</p>
  
  <pre><code>ifstream in (argv[1]);
  in.open(argv[1]);
  if (!in.is_open()) exit(EXIT_FAILURE);
  char c;
  in &gt;&gt; c;
  cout &lt;&lt; c;
  </code></pre>
  
  <p>Doesn't pass anything back to <code>cout</code>, as though there is no character. What am I doing wrong?</p>