Skip to content

Commit 4c57f63

Browse files
committed
Add menu logic
1 parent 52a4543 commit 4c57f63

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/menu.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22

33
Menu::Menu(std::istream &in)
44
{
5-
5+
for (int idx = 0; !in.eof(); idx++)
6+
{
7+
std::string name;
8+
double price;
9+
in >> name >> price;
10+
items[idx] = Item(name, price);
11+
}
612
}
713

814
void Menu::print(std::ostream &out)

0 commit comments

Comments
 (0)