title: Assign numbers to characters C++
body: <p>I need a way to assign numbers to letters in C++, for example, <code>'$'</code> would represent the number 1. I obviously need to be able to obtain the number from the character with something like a function, e.g. <code>getNumFromChar('$')</code> would return 1 and  <code>getNumFromChar('#')</code> would return 2. Is there an easy and fast way to do this in C++?</p>