title: replacing letters with numbers using C++
body: <p>I need to replace my input letters with numbers.<br>
  <code>a = 00</code>, <code>b = 01</code>, <code>c = 02</code> and so on...<br>
  I think there is something wrong with char enc, program doesnt work when <code>ch == 'j'</code> or higher.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;conio.h&gt;
  #include &lt;string.h&gt;
  #include &lt;windows.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;ctype.h&gt;
  
  int main(){
      char ch = 'g'; // this should be replaced with some kind of an input function
      char alp[26] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',
            'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
      char enc[26] = {'00', '01', '02', '03', '04', '05', '06', '07', '08', '09',
                      '10', '11', '12', '13', '14', '15', '16', '17', '18', '19',
                      '20', '21', '22', '23', '24', '25'};
      for(int i = 0; i &lt;= 25; i++)
          if(ch == alp[i]){
              printf("%c", enc[i]);
              break;
          }
  
      while(getchar()!='\n');
      return 0;
  }
  </code></pre>