Results 1 to 2 of 2
hi
I wants to open a file in binary form at .
as you know b letter in fopen function is for opening the files , but it dosent open ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 12-25-2005 #1Just Joined!
- Join Date
- Jul 2004
- Location
- Iran
- Posts
- 20
C programming , fopen
hi
I wants to open a file in binary form at .
as you know b letter in fopen function is for opening the files , but it dosent open it in binary format .(found in man page ''b'' don't work in ANCY C)
is there any other function to do that or i can do it with fopen ?!!!!
thanks for your attention
- 12-27-2005 #2Linux Engineer
- Join Date
- Feb 2005
- Posts
- 1,044
All files are opened in "binary" format on Linux. It's a kludge that had to be introduced to cope with Micro$oft text files that use stupid line terminations (\r\n). It's MS text files that have to opened "specially" to merge the \r\n into a single \n. Have you actually got a problem, or did the ANSI C reference in the manpage confuse you?


Reply With Quote
