I can;t get my information when I do it though? What do you mean that size parameter as an integer reference is a bit akward?
I can;t seem to get this third line of info.
Thanks
Trying to read this line
Ah, when you use fin>>, it stops at a newline but leaves it there. So when you next call getline() it immediately reads that newline and returns an empty string.
Cool Thanks, I got another question too. Like I said I'm trying to read from a file All my junk in main right now is just trying to see if I get everything I need from the file.
Right now all I get is the same thing repeated over and over. It works for the first set of info then it does it over and over. I cant figure out why. I have the idea that it is because the index is not updating in my readData function
OK I see now, but there is an issue. I changed it so it works except.
There are 5 lines of names
If I change
1 2 3 4 5
for(int i = 0; i < 1; i++)
{
cout << tele[i].fname << endl;
}
i<3 works fine I get the names I'm supposed to. When I make i<4 I get an issue because instead of the next name I get a phone number. All lines of input are of length 4 for one address. So its not missing a line of input. Whats going on with this ?