Hello,
I have a text file of unknown size that I need to read into a struct array where the struct looks like :
{
short hours
float secondsPastHour
float data1
float data2
}
But the text file is in the format
hh:mm:ss data1 data2
I have an array of the struct and I need each line in the text file to be read into one record of the array. I know how to open a file but I am having a hard time finding how to read and reformat the data in the file, and how the colon's are handled in the time string. How can I split this into two separate variables?
Thanks for the replies!
I have a text file of unknown size that I need to read into a struct array where the struct looks like :
{
short hours
float secondsPastHour
float data1
float data2
}
But the text file is in the format
hh:mm:ss data1 data2
I have an array of the struct and I need each line in the text file to be read into one record of the array. I know how to open a file but I am having a hard time finding how to read and reformat the data in the file, and how the colon's are handled in the time string. How can I split this into two separate variables?
Thanks for the replies!
Comment