Computer Science Canada strint with Arrays? |
| Author: | Flikerator [ Sat Mar 05, 2005 5:25 pm ] | ||
| Post subject: | strint with Arrays? | ||
I want to convert my array of string to an array of int. Can I do that?
Convert where the second for statement is, I put it in there incase its needed. You can take it out if its not needed. |
|||
| Author: | Cervantes [ Sat Mar 05, 2005 6:06 pm ] | ||||
| Post subject: | |||||
Sure you can do that.
However, let's improve on that a bit, using the strintok() function.
This just prevents the program from crashing. |
|||||
| Author: | Flikerator [ Sat Mar 05, 2005 6:14 pm ] | ||
| Post subject: | |||
Overflow in result of strint Because the value is "12345678987654321" Is there anything I can do? |
|||
| Author: | Cervantes [ Sat Mar 05, 2005 6:37 pm ] |
| Post subject: | |
Use real variables, instead of integers. That, or you could break the number up into different parts. But that's just too much extra work. |
|