dubstar
format c:
- Joined
- 3 Dec 2002
- Messages
- 1,357
my first Struct:
what am i doing wrong ??
Code:
struct menuType //struct definition
{
string itemName; //name of item
double itemPrice; //price of item
};
string getMenu()
{
ifstream menuList;
menuList.open("menuList.txt");
if (menuList.is_open())
{
while (! menuList.eof())
{
cin.getline (menuInfo.itemName,menuInfo.itemPrice);
}
}
};
what am i doing wrong ??