|
-
March 31st, 1999, 11:25 PM
#1
OE Exception caused by writing to ouput file
I'm writing a simple console application in Visual C++ and after no apparent problems in this area of my code, I'm
suddenly getting an OE exception error Access Violation after opening an output file and then passing it to a function.
The file opens successfully, after:
ofstream fout; // an output file
.
.
.
.
fout.open("output.txt",ios: ut); // prepare output file
if (!fout)
{
cout << "Cannot open "<< fileName << ".";
return 0;
}
and then at this point when debugging, I notice in the watch, that I have the
error CXX0030 for the ostream __vsptr. It only causes an exception when I pass it to a function which writes to it
with:
fout << GraphName<< endl; // (GraphName is a string)
I've done this many times without problem. I've tried opening a new project, etc,and can't figure out why it's a
problem now.
If anyone has any idea why this would happen, please let me know.
Thanks,
Diana
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|