It is possible?
#1

Its possible to read one file twice at same time?
Reply
#2

I believe you should be able to, don't see why you wouldn't be able to.

Try it and see for yourself.
Reply
#3

Yeah, file handles has got a special ID out of fopen.
Reply
#4

Yes you can. You can also write to it while it is opened in another handle, but only the text of the last time you close it will save.

Eg. you open a file twice in write mode.
In the first you write "hello", and the second "test".

When you close the first one, "hello" will be stored, and when you close the second "test" will be stored and overwrite the previously stored content.

You can also open the same file twice and write different stuff in both, then use fseek and read the individual content of it. You will basically have 2 different files from which you can read/write, but upon closing it will overwrite.

This is for Windows, there might be a different behaviour on Linux!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)