Anyone knows how can a string that holds a number be assigned to a variable declared of integer data type ? I've tried to use casting but it fails to work.
eg. string temp = "26";
int num;
num = temp; ?! how to ?!
Anyone knows how can a string that holds a number be assigned to a variable declared of integer data type ? I've tried to use casting but it fails to work.
eg. string temp = "26";
int num;
num = temp; ?! how to ?!
you need atoi().....
if your quick, you will catch the example that Quzah has just posted on the C Board
run run run........
Thanx a lot buddy ! Now, my program is working smoothly.