| | |
Closing a test File after writing in it
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
Hi All.
I am developing a C++ application which has a module to read data from a text file and then write some its data into another text file and then save that.
Everything goes right tilll the last line of the program when I end up writing and try to close the file as follows,
the following error comes out.
General Protection exception
0x24E7:0x54F3
[TEST1]0x24E7:0x54F3 processor Fault
Where test is the name of folder I ahave placed both the files in.
I am using Visual IDE of
Turbo C++
Version 4.5
Thanks.
I am developing a C++ application which has a module to read data from a text file and then write some its data into another text file and then save that.
Everything goes right tilll the last line of the program when I end up writing and try to close the file as follows,
C++ Syntax (Toggle Plain Text)
fclose(outFile);
the following error comes out.
General Protection exception
0x24E7:0x54F3
[TEST1]0x24E7:0x54F3 processor Fault
Where test is the name of folder I ahave placed both the files in.
I am using Visual IDE of
Turbo C++
Version 4.5
Thanks.
Have you corrupted outFile prior to this attempt? The supporting code may contain your answer.
"One of the methods used by statists to destroy capitalism consists in establishing controls that tie a given industry hand and foot, making it unable to solve its problems, then declaring that freedom has failed and stronger controls are necessary." --Ayn Rand
Well there's nothing wrong with that line, so it must be something else.
My guess is that you've trashed memory somewhere else in your program, and this just happens to be where you find out. It could have crashed at any other line as well, and then no doubt you would have posted that line instead.
To make any real progress of diagnosing the problem, you would need to post the whole program.
My guess is that you've trashed memory somewhere else in your program, and this just happens to be where you find out. It could have crashed at any other line as well, and then no doubt you would have posted that line instead.
To make any real progress of diagnosing the problem, you would need to post the whole program.
![]() |
Similar Threads
- Optimizing text file writing in VB 6.0 (Visual Basic 4 / 5 / 6)
- ofstream - detect if file has been deleted between open and close (C++)
- writing to a file (Java)
- Zend PHP Certification (PHP)
- Checking if a file is in Writing/Saving mode (VB.NET)
Other Threads in the C++ Forum
- Previous Thread: Optomizing for Pentium Pro
- Next Thread: Need Book on Design Patterns
| Thread Tools | Search this Thread |
api array based beginner binary bitmap c++ c/c++ calculator char char* class classes coding compile compiler console conversion convert count data database delete desktop developer directshow dll dynamiccharacterarray email encryption error file forms fstream function functions game getline google graph homeworkhelper iamthwee ifstream input int integer java lib linkedlist linux list loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference return rpg sorting string strings struct template templates test text tree unix url vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






