Original Post
hi. i dunno if this has been answered before, but the search function didnt seem to be working for me. ok, what i want to do, i want to get a single letter out of a c++ string object by using the substr() function and storing it in a pre prepared (dynamic) int (but still just one character) to get the ASCII code, or whatever it is when ''56'' is 8. (hold down ALT and type 56). What i tried doing was:
iSomeArray[1] = sSomeString.substr(5);
*(piSomeArray+1) = sSomeString.substr(5);
but it doesnt seem to work, saying something about conversion! how can i get a single character out of a string and store its value in an int? (it works with single CHARS).
Thanks
Arbz
btw, im using VC++ 6 on winXP pro