CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 1999
    Posts
    4

    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

  2. #2
    Join Date
    Jun 1999
    Posts
    143

    Re: OE Exception caused by writing to ouput file

    Did you ever resolve the CXX0030 error message you were getting? I saw your post. I am getting the same error with a CString member variable in a CDialog class.......thanks.........



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured