Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
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 · ·