Hi ,
When ever we read any data from file ,we read as a single line string ,and we convert the respective field data available in that string based on the data type ( say int,float ).
Please suggest me which is the best way of handling the file data.
I- Method:
----------------
Store as single line string data's(upto end of file ) in a list and make use of this string list for the entire application.
When we required that single line data, which is having different data types,we convert it and get that details and make use of these data types in our application when and as required
In a nut shell,while reading the data we are storing as string data,when it is required in the application to do geometric operation ,we convert the data into int /float from the string at that location
II- Method:
---------------
Traverse the singleline data and convert the string data into the respective datatypes and store in a variable (say list).
In a nut shell,while reading the data itself ,we are converting the respective data types and storing it,instead of keeping the data in string format
Store as single line string data for the entire application and whenever you required that single line data,in different data types,you convert it and get the deatils and make use of these data types in your application.
Thanks
PSB