No, a string or a cstring are containers. Ints and chars are scalars, if you will. You can refer to the i'th character in a string or array of chars using [i] (starting at zero). Those you can cast to ints.
Printable View
No, a string or a cstring are containers. Ints and chars are scalars, if you will. You can refer to the i'th character in a string or array of chars using [i] (starting at zero). Those you can cast to ints.
Yeah, realized that, but I'm using string::at(0) instead of the string [] operator, which will also work:
http://codepad.org/syOCO6Mq
Thanks for the help.