I am creating a class to manage some data, to use in an application, and have a data file. Each line of the data file should be an object of my new class. The data is comma separated, but could become tab separated if necessary.
For each item on a line, this should be an attribute of the object i.e.

Contents of text file:
dave, baggott, osm, england

<Object creation>
where the object would then be something like

object.firstname=dave
object.surname=baggott
object.companyname=osm
object.location=england

Any ideas on the best way to do this?

Also, I want it to be used in the application I am makin so should I create an application first and then add the class to it, in which case where do i put it. If not, do i just make a new c++ source file and then an application in the same workspace??

Any help would be great

dave.

oh, also is it a txt file only that can be used? i have a txt version but originally it was a dat file. can I just read from this??