while(getline(INPUT,textLine))
{
Object* s = new Object(textLine);
}
How would I hold a reference to the Object of the previous textLine so that I could compare the two in some compare method
s.Compare(***); <– comparing the second iteration to the first
Note that *** is of type Object
You want to keep track of the previous instance of Object?
Put it in a variable (called
tbelow), and use the variable when you need it.Remember to delete everything you allocate.