This topic is now archived and is closed to further replies.

C++ Help

This topic is 6109 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m not sure this is the right place to post this, but I''m having problems compiling a project. All the stuff that is related to ofstream does not work if I run the program, but if I step through it it works fine! Its the same for both debug and release versions. This is driving me crazy. Any help would be greatly appreciated.

Share this post

Link to post
Share on other sites
BTW this is an ATL object. Or rather it is a class referenced in an ATL object.

ofstream _os;"Test.txt", ios::app);
_os << "junk";

Thats the code that doesn't execute if I let it run on its own
and does execute if I run it in the integrated debugger. By not execute, I mean the file does not get created or modified and neither does the timestamp change.

Help! Help! I'm going nuts. I even tried ios::sync_with_stdio(); as suggested by a site, but nothing seems to make it work!

I wonder if it has anything to do with mixing stdio and fstream in this project. I tried using one or the other but that doesn't seem to work. Any insights?

Edited by - simfan on March 21, 2001 5:14:20 PM

Share this post

Link to post
Share on other sites