Using .getline inside of a function ERROR

Can someone tell me the correct way to read in data from a file with this kind of format:
(sample file data)
Plain Egg
1.45
Bacon and Egg
2.45
Muffin
0.99

as you can see, I have tried to use infile.getline but it just gives me the ERROR "A pointer to a bound function may only be used to call the function"
At first i tried to just use

 
infile >>  menuList[index].menuItem;


but that only read in "Plain" and stoped at the blank between plain and egg.

1
2
3
4
5
6
7
  for (index = 0; index < 8; index++)
    {
		infile.getline >> menuList[index].menuItem; 
		cout << menuList[index].menuItem<<endl;
		infile >> menuList[index].menuPrice;
		cout << menuList[index].menuPrice<<endl;
    }
I did not search very well before I ask my question. The same question was ask ans answered here:
http://www.cplusplus.com/forum/beginner/23384/
Topic archived. No new replies allowed.