Then assuming that data is a built-in type and/or has its input output operators correctly defined, something like this should work. You need to substitute the right type for your data and whatever the function names you use to clear the list and add new elements:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
ifstream inFile("ABS.txt");
void Node::loadNode(ifstream& inFile)
{
clear(); // clear current data from list
int data; // whatever type data is
while(infile >> data) // try to read data from file
{
// read was successful so put data into list using regular methods
append(data);
}
}