Help please. I don't get it...

1
2
3
4
5
6
7
8
9
10
while (getline(inStream, line))
	{
		while (inStream >> Student.getId() >> Student.FNAME >> Student.MINIT >> Student.LNAME >> Student.GENDER >> Student.UNITS >> Student.getGpa())
		{
			while (Student.getId() != id)
			{
				outStream << line << endl;
			}
		}
	}



This is what I have right now. It shouldn't be a problem, but for some reason I am getting an error trying to >> Student.getGpa()

Error 1 error C2679: binary '>>' : no operator found which takes a right-hand operand of type 'double' (or there is no acceptable conversion) c:location 130 1 Project 5

I will post more code if needed, but... I just don't know. I have a TON of code so I would rather not if I don't have to. Do I need to #include something...? I'm so confused..
inStream >> Student.getGpa() is probably similar to saying Student.getGpa() = 42.0;.
I bet that statement fails too.

The definition of the class that the Student is would be informative.


PS. Why read a line and then read other values from stream? Does calling Student.getId() return different value every time?
I fixed it by just changing it to a random double variable. That's all I really needed to check I guess.
Topic archived. No new replies allowed.