Having an infile.getline problem!
class item
{
public:
apstring name;
apstring shortName;
apstring lookDesc;
int type;
void infileData(ifstream&infile)
{
infile.getline(buff, 30);
name = buff;
infile.getline(buff, 30);
shortName = buff;
infile.getline(buff, 80);
lookDesc = buff;
}
private:
char buff[80];
};
The problem is that only the first getline is actually doing anything!!!!!!! Help! Also adding ''\n'' as a parameter doesn''t help
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement