I'm trying to write a program which uses classes to complete a range of operations on data from a file. As if the classes aren't causing enough trouble, I can't seem to get the fstream read function to compile. No matter how far I strip my program back I keep generating the same error:
Error:
9: invalid use of member (did you forget the `&' ?)
Can someone please tell me what the problem is? I've got two university-level textbooks which as far as I can tell say this is correct, and in any case C++ doesn't get much simpler.
Thanks, that's genuinely embarrassing. I put the '=' in when it wasn't working for a different reason, I don't know how I missed it. Maybe something to do with the other 200 lines of code.