0

Hello, I am working on a server program that deals with opening files, or at least that is all that is relevant for this post. I am using VC++.
I use multithreading so that it can be multi-client, of course, but when I try to use this line:

infile.open(filename, ios::in);

(assume "ifstream infile" and "string filename" defined)
This causes the error "unresolved external symbol __CrtDbgReport". I am fairly sure this has something to do with the multithreading aspect of the program because it only started appearing when I added the threads.

The same exact error comes up when I try to simply include iostream.h but I didn't think of it much at the time because I learned that printf() worked. However, unless there is a fileopenf(), I think this an impasse.

If there is a way to fix this fstream problem, maybe it would also fix the iostream problem.

2
Contributors
2
Replies
3
Views
11 Years
Discussion Span
Last Post by ilikerps
0

Gah! Why does that work and why are my problems always so simple and stupid?
No, that was a rhetorical question. Thanks for the help.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.