getline function

Im having an issue with my getline function it seems to read nothing...
Whats wrong?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
                cout <<"Insert save file name."<<endl;
                cin >> save;
                save+=".txt";
                ifstream in (save.c_str());
                in >> me.maxhp;
                in >> me.hp;
                in >> me.points;
                in >> me.gold;
                in >> me.name;
                in >> me.wep;
                getline (in, me.questMob);
                in >> me.questMobKills;
                in >> mobKillQCount;
                in >> reward;
                in.close();

The file that it's reading from:
1
2
3
4
5
6
7
8
9
10
30
22
7
65
Jack
2d4
swarm of rats
0
25
35
Last edited on
Alright so i seem to have fixed it by just making the getline function the first input, if its not the first it doesn't work i don't get why.
Topic archived. No new replies allowed.