C++ Help

Started by
2 comments, last by simfan 23 years, 1 month ago
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.
Venturer
Advertisement
You probably should post some more information about the problem if you want help...Cut and paste the offensive code and im sure some one will help out. =P



Mike Barela
MikeB@yaya.com
Mike BarelaMikeB@yaya.com
Yeah, please specify "doesn''t work". I''d be glad to help.

Jinushaun
BTW this is an ATL object. Or rather it is a class referenced in an ATL object.

ofstream _os;
_os.open("Test.txt", ios::app);
_os.flush();
_os << "junk";
_os.close();


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
Venturer

This topic is closed to new replies.

Advertisement