
i am unable to read from a file having 26ascii character(ctrl+z)
Quote:
> in writing a program,i am storing values in a file in binary mode,
> when i store 26, it's storing well. but when i am reading from the file,
> it is returning eof(-1) as ascii26 represents ctrl+z
> could any one plz give me a legitimate solution.
Are you opening the file in text mode with fopen("filename", "r")? Open
it in binary mode instead with fopen("filename", "rb"). This stops your
implementation from assigning special meaning to the character 26.
--
| Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
| http://www.helsinki.fi/~palaste W++ B OP+ |
\----------------------------------------- Finland rules! ------------/
"Keep shooting, sooner or later you're bound to hit something."
- Misfire