r+b filemode

Joel Sherrill joel.sherrill at OARcorp.com
Thu May 26 17:57:20 UTC 2011


Which filesystem?

Do you have a complete small test case?

Someone else will likely have other ideas.  I am on travel and just wanted to ask the obviuous questions.

--joel

Oleg Moroz <oleg_moroz at yahoo.com> wrote:

>Hello everyone, i have a trouble with opening file. i have opened the file with "wb" mode. Write to it 512 bytes. close it. after this open it with "r+b" mode. then trying:
>
>///
>fseek(file,0,SEEK_END);
>int i = ftell(file);
>///
>
>
>
>after this i=0
>
>but when i'm opening file with "rb" mode - i=512. how i can use "r+b" mode?




More information about the users mailing list