title: Count bits starting from the ones, then tens and so on
body: <p>Coding in C++.</p>
  
  <p>I'm trying to print out only a specified digit from a binary code in the form of a string. The user can specify a certain digit position, and the number in that position must be printed. </p>
  
  <p>Eg. string c = "11011001" and the user wants the 1st position. The output has to be 0.</p>
  
  <p>Count indices start at 0 and from the 'ones' digit meaning a request of the 1st position is the number in the 'tens' digit position.</p>
  
  <p>I have no idea how to start counting from the ones column. I tried c.at() but that starts from the left most digit and counts towards the right.</p>