If have a Sring char *t="39";
how can I convert it to a number ?
so I can add subtract from it can I use cast here?
If have a Sring char *t="39";
how can I convert it to a number ?
so I can add subtract from it can I use cast here?
You cannot cast it. There is a function atoi() which you could use. Or else write your own function. Take a digit, determine it's place and multiply it with 10^place. And add all the results. Like:
3 * 10^1 + 9 * 10^0 = 39