所以现在我有以下内容:
boost::ptr_vector <Customer> cvect;
ifstream cDbase("datafiles/customers.txt");
while (cDbase.good())
{
while (!cDbase.eof())
{
cDbase >> newCust;
Customer* c = &newCust;
cvect.push_back(c);
}
}
for (unsigned int loop = 0; loop < cvect.size(); loop++)
{
cout << cvect[loop];
}
当我尝试打印客户详细信息时,它会打印出空白行。如何正确取消引用 ptr_vector?