|
Reading in a file
I'm new here so I don't know the protocol for asking a question of this nature but here goes...
I'm working on a program in which I need to read into a list, from text file: a task name, it's due time, the hours needed to complete the task, and the number of points the task is worth.
I'm using a simple structure:
struct Task
{
string name;
int dueTime;
int hoursNeededToComplete;
int nmbrPoints;
};
The format of the text file is as follows:
name dueTime hoursNeededToComplete nmbrPoints
name dueTime hoursNeededToComplete nmbrPoints
name dueTime hoursNeededToComplete nmbrPoints
etc.
Anyway, help on this would be great. If I haven't provided enough information, feel free to let me know.
Thanks
|