i want to cast a char * to an int, but i cant get it to work.
say my char * is called temp and my int is tempint.
i tried tempint = (int)temp, but that gave me really large number. I tried tempint = temp - '0', but got compile error(must use c style or reinteprert). I tried tempinit = reinterpret_cast<int>(temp), but that didnt give me correct integer value either. Any ideas on what i am doing wrong or what else i couldtry?
thanks a lot
robbaggio
say my char * is called temp and my int is tempint.
i tried tempint = (int)temp, but that gave me really large number. I tried tempint = temp - '0', but got compile error(must use c style or reinteprert). I tried tempinit = reinterpret_cast<int>(temp), but that didnt give me correct integer value either. Any ideas on what i am doing wrong or what else i couldtry?
thanks a lot
robbaggio