title: Converting letters to numbers in C++
body: <p>PROBLEM SOLVED: thanks everyone!</p>
  
  <p>I am almost entirely new to C++ so I apologise in advance if the question seems trivial.</p>
  
  <p>I am trying to convert a string of letters to a set of 2 digit numbers where a = 10, b = 11, ..., Y = 34, Z = 35 so that (for example) "abc def" goes to "101112131415". How would I go about doing this? Any help would really be appreciated. Also, I don't mind whether capitalization results in the same number or a different number. Thank you very much in advance. I probably won't need it for a few days but if anyone is feeling particularly nice how would I go about reversing this process? i.e. "101112131415" --> "abcdef" Thanks.</p>
  
  <p>EDIT: This isn't homework, I'm entirely self taught. I have completed this project before in a different language and decided to try C++ to compare the differences and try to learn C++ in the process :)</p>
  
  <p>EDIT: I have roughly what I want, I just need a little bit of help converting this so that it applies to strings, thanks guys.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;sstream&gt;
  #include &lt;string&gt;
  
  int returnVal (char x)
  {
      return (int) x - 87;
  }
  
  int main()
  {
      char x = 'g';
      std::cout &lt;&lt; returnVal(x);
  }
  </code></pre>