title: How do I extract one character from any location in a text file?
body: <p>I'm trying to extract 1 character from different positions in a text file, not in sequence.
  If I have a text file that says, "Hey how you doing?"
  Say I want to extract the 6th character "o", and put it in this_char.</p>
  
  <p>I'm a beginner.</p>
  
  <pre><code>myfile &gt;&gt; this_char;  //first character
  myfile &gt;&gt; this_char;  //second character
  </code></pre>
  
  <p>.
  .</p>
  
  <pre><code>myfile.get(this_char); //first character
  myfile.get(this_char); //second character
  </code></pre>
  
  <p>.
  .</p>
  
  <pre><code>myfile[6] &gt;&gt; this_char;  //doesn't work
  
  fstream myfile;
  myfile.open("C:/Users/muhname/Desktop/INPUT.txt");
  char this_char;
  </code></pre>