[code]
//include statements
#include <iostream>
#include <fstream>
#include <iomanip>
#include <cmath>
#include <string>
Edited by kevinsabres, 21 April 2010 - 10:48 AM.
add code tags (the # button)
Edited by kevinsabres, 21 April 2010 - 10:48 AM.
add code tags (the # button)
|
|
|
int getData(ifstream& indata, menuItemType list[], int length)
{
int counter = 0;
while(counter < length && getline(indata, list[counter].menuItem) )
{
indata >> list[counter].menuPrice;
indata.inore(); // remove the '\n' after the price
++counter;
}
return counter;
}
0 members, 1 guests, 0 anonymous users