(Untitled)

Dec 02, 2003 13:48

Santa just gave me a candy cane... hey.. everyone who reads this go find a programmer you know and show them this error.. see what they say:

ImageHandler.cpp(1449): error C2664: 'CImageHandler::zLoadTipFile' : cannot convert parameter 1 from 'std::ifstream' to 'std::ifstream'

Leave a comment

Comments 6

draemorticus December 2 2003, 12:48:59 UTC
Can you show us the code that actually caused the error? What's so weird about parameter 1 that it'd be giving you such an odd error? ;) You'd think it wouldn't have any problems converting from an ifstream to an ifstream :P

Reply

draemorticus December 2 2003, 12:51:25 UTC
Ooh - just had a thought. Is it possible that the parameter you're passing is one version of ifstream and the one it's expecting is another version? i.e., whatever code is making the original that's getting passed in is using a different STL/ifstream than the code in the method? That's the only thing I can think of that would make it say that a std::ifstream isn't the same as a std::ifstream. Maybe?

Reply

urdead December 3 2003, 05:07:03 UTC
You aren't ria right? You don't look or sound like her.. but she is a tricky one.. and i spent too much time yesterday talking to ria so you better not be ria.. Oh and I have no idea why that wasn't compliling they were both the same version of fstream, I had been changing over from the old fstream.h to new fstream so i was making sure they were all the same version. Anyway, i found someone online who had the same problem and was like 'yea i just passed it by reference and it worked' so i tried that and it worked ! :)

Reply

hey! >O summonerrydia December 5 2003, 10:18:11 UTC
i resent that.

Reply


anonymous January 18 2005, 23:07:39 UTC
ifstream has a private copy constructor, so a copy cannot be implicitly made when you try and pass it by value.

Reply

urdead January 19 2005, 22:57:29 UTC
ahh I was still wondering about that... bored weren't you..

Reply


Leave a comment

Up