I am developing a software for data acquitition using vc++6.0.
During the course of the program I am getting a fatal error OE. On investigating the fatal error 0E, I realised that this is a page fault.
I am getting this error while I am setting a text in an edit window of a dialog box.If I comment the code line in which I have used SetWindowText , The fatal error is eliminated. I am not able to reason out the problem. I have also used _out and _inp for addressing the data acq. card.
I am writting the code below.
//First get the text from the edit box.m_filename1 is a member
//variable of edit box
// some outport & inport commands for card interfacing
dtl = _inp(portA);
dth = _inp(portA+1);
//Opening a file of name fetched by the text box and saving
//some data in it and then closing the file.
ofstream file (name1);
file<<"OUTPUT VOLTAGE"<<" "<<"VOLTAGE(V1) ";
file<<"VOLTAGE(V2) "<<"RATIO(V1/V2) "<<"\n"; file<<temp;
// outporting certain values again before exit
n = 0;
// Changing the name of the file to be used for storing the next
//run by incrementing the number and adding it to the filename
incr = incr+1;
// (name1) now contains the string to be used as the next file
//name. BELOW IS THE LINE THAT IS CREATING THAT FATAL
//ERROR. IF I COMMEMNT THIS LINE , THE PROBLEM IS SOLVED
//BUT HOW WILL I THEN WRITE THE NAME OF THE NEXT FILE IN
//THE EDIT BOX.
I am stuck in the above problem.
How to remove the exception invalid page fault or fatal exception 0E.
Help me if you can.