I am still having problems so I have decided to use another route that I cannot figure out :-( how do I convert string to int?
This is a discussion on Still string problems within the C++ Programming forums, part of the General Programming Boards category; I am still having problems so I have decided to use another route that I cannot figure out :-( how ...
I am still having problems so I have decided to use another route that I cannot figure out :-( how do I convert string to int?
have you tryed using pointers? im just guessing, dont know the whole story on this
THE Dark_Knight_506
atoi() is one possibility.
Code:#include <stdlib.h> int main() { char cnum[33] = "44444"; int num; num = atoi(cnum); cout << "num:" << num << endl; return 0; }