31.12.2014 Views

Paskaitų konspektai - Matematikos ir Informatikos fakultetas ...

Paskaitų konspektai - Matematikos ir Informatikos fakultetas ...

Paskaitų konspektai - Matematikos ir Informatikos fakultetas ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

}<br />

for (;;)<br />

{<br />

string name;<br />

printFoodList(foodList);<br />

cout > name;<br />

if (name == "#")<br />

return 0;<br />

FoodList::iterator iter = foodList.begin();<br />

for (; iter != foodList.end(); iter++)<br />

if (name == (*iter)->getName())<br />

return *iter;<br />

}<br />

return 0; // unreacheable<br />

void printFoodList (FoodList& foodList)<br />

{<br />

cout itemPrice;<br />

Selling* selling =<br />

new Selling(food, date, itemCount, itemPrice);<br />

food->addSelling(selling);<br />

sellingList.push_back(selling);<br />

}<br />

void showFoodDetails(FoodList& foodList)<br />

{<br />

cout

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!