Reading from a file to object

I have an input file with 6 lines of data, each formatted in the following way: X,Y,Z.
My goal is to get the file name from the user, the store each line from the input file into an object of "class sample". I need to separate each variable from the file into 3 categories for further manipulation.
What is the best method to accomplish this?
My idea is to get the file name in the main program, open the file, use an object to read each line and store each encountered character (non-whitespace or symbol) into it's respective variable. Then, I can use the distance equation to determine the distance between points and keep track of what class the data is in.
Am I missing a step?

I am trying to write a program for the feature reduction using the RELIEF algorithm. I want it to be as simplistic as possible as I will be utilizing it often.

Thank you!
closed account (o3hC5Di1)
Hi there,

It seems like you have it pretty much covered. I would suggest you attempt your implementation and get back to us with your code if you encounter any problems.

All the best,
NwN
Topic archived. No new replies allowed.