hi there, i have a trouble in my recent project. the problem descrition is:
- a input_file.dat with lines of numbers
2 4 5
7 6 8
7 4 12
notice the number "12"
now i want to read numbers from input_file.dat and load them into array.
char ch, arr;
the work is possible in that example, but when i changed the type of arr to integer to manipulate data, it can't work because difference of type char-integer. and it treats 12 as arr[x]=1, arr[y]=2
1.is there any function convert char to int?
2.can i get the number 12?
3.can you give the source to load input_file.dat to: integer 2Ds array?
0 · ·