Hi,
why doesn't this work?
why does c++ find it so difficult toCode:#include <iostream> using namespace std; int main() { string abc = "12345abcde"; char une; int uno; une=abc[1]; // une = "2" uno=(int) une; // uno=2 uno *=3; // uno=6 cout<<"uno is: "<<uno<<endl; //outputs "uno is 150" return 0; }
reinterpret a character 2 from a string
as a numeral 2 ?!
thanks