[ back to toc ]

C Files

Date: 2002/04/07 13:14

Hello Peter,
I asked you previously about my problems using text-files. You suggested
that I use other computers for my programs.Unfortunately, I have tried
that and the same problems come up,so it can't be the machine. The only
possible conclusion is that I have fouled up somewhere!
To remind you,(I fear I was rather vague), I should mention that any
program I use without files DOES WORK, but any program where I use
text-files DOESN'T. Whenever I write the data onto a text-file direct, I
then save it to the workspace and the bloody machine says "This File Has
Been Modified outside the source editor",whatever that means. I then try
to get the program to send the information on the first text-file to the
2nd text-file . The program once I compile it,then crashes(like on my
computer) or flashes endlessly onscreeen with the numbers from the first
text-file.Any ideas as to what I did to foul up the programming would be
deeply appreciated! I ought to mention that I did not include an
end-of-file character at the end of my first text-file, as my C books are
incredibly vague about what the EOF is supposed to be.My using #define for
an arbitrary EOF has failed.
Yours Puzzled As Ever,
"This File Has Been Modified outside the source editor" is a message that
the integrated development editor tells you. What C compiler do you use
BTW? Is it TURBO C or Visual C++?

The error message means that the following:

When you open a text file using the editor the file is opened, and the
content is read into the editor and the editor remembers when is loaded
the file. When it saves the file it actually overwrites the old file. But
before doing that it checks the the 'file last modified' time. If this is
newer than when it was loaded it gives you the warning you mentioned. Thus
it has to be something with the clock or time setting of the OS.


[ back to toc ]