from a file and putting it in the vector. On the third item read in,
it reaches the .push_back code. However, after that, I use .size(),
and it says that it only has two items. This is bizarre. Any
thoughts?
Code fragment may be found below. Thanks, Alan
while (inFile >sensed_data.ti me >sensed_data.se nsor_who >>
sensed_data.air craft_who
sensed_data.yco r>sensed_data.IF F >sensed_data.xc or >>
sensed_data.cou rse>sensed_data.al titude >sensed_data.sp eed >>
{>sensed_data.Tr ack_Quality)
// cout << "Reading input file\n";
if (sensed_data.ti me == last_clock)
{
cout << "Adding report to list\n";
cout << "Data to add: " << sensed_data.sen sor_who << " "
<< sensed_data.air craft_who << "\n";
sensor_reports. push_back (sensed_data);
cout << "# sensor reports = " << sensor_reports. size() <<
"\n";
}