Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to make use of ifstream &

Status
Not open for further replies.

Huskey

Vendor
Aug 23, 2002
53
0
0
GB
Hi,

I have a problem. If the function is only taking ifstream, e.g.

VirtualTable::Load(ifstream &stream) {......
}

what kind of values I should supply? Let's say, my data is in class CDatabase? I got this error:

D:\Test\MainFrm.cpp(182) : error C2664: 'Load' : cannot convert parameter 1 from 'class CDatabase' to 'class ifstream &'. A reference that is not to 'const' cannot be bound to a non-lvalue

Please help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top