Problem with reading records

used friend void append(SalesRecordPtr& head, SalesRecord& thisrecord) as my append fuction what should be in the question mark areas?

1
2
3
4
5
6
7
8
9
10
11
12
 SalesRecordPtr read_records(ifstream& in)      // Allocate space for records & read them
// Parameters: Input stream, List of records.      
// Returns   : Pointer to list of records allocated.                                                        
// Calls     : read(), append().                                                        
{  SalesRecord      temp;           // Temporary record in which to read data
  ? = NULL;                  // Initialize to NULL incase no records
                                    // Peek ahead to see if there is anything in file
   while (in.good() && !in.eof() && in.peek() != -1)    
   {  temp.read(in);               // Read next record
      append(?, temp);        // Add record to end of list
   }
} // End of read_records() 
Last edited on
Topic archived. No new replies allowed.