Re: File handling in C




PJ wrote:
> Hi,
>
> I have a file that contains some data. I want to write a function that
> reads the file and return a string(char *) which contains the content
> of file.(File can be of any size).
>
> PJ

This seems like another question with the same answer. Go get FreeDOS
Edlin (available at either ibiblio or alt.sources) and see how I did
it.

Gregory Pietsch

.



Relevant Pages

  • Re: Array of strings
    ... or the alt.sources newsgroup) and borrow that code. ... Gregory Pietsch ... Prev by Date: ...
    (comp.lang.c)
  • Re: Recommendation for Code/Text Editor?
    ... Bob Stephens wrote: ... >Real men use Edlin ... Realer men use copy con. ... Prev by Date: ...
    (comp.arch.embedded)
  • Re: How is strlen implemented?
    ... NULL is usually reserved for the null pointer. ... the null character, '\0'. ... Gregory Pietsch ... Prev by Date: ...
    (comp.lang.c)
  • Re: A red tide in the affairs of men.
    ... >>The edlin i have installed does not appear to do regular expressions, ... i would call edlin worse than ed. ... Our inventions are wont to be pretty toys, which distract our attention ... Prev by Date: ...
    (alt.sysadmin.recovery)
  • Re: string finding
    ... Gregory Pietsch wrote: ... > size_t (const char *s) ... to represent the length of an arbitrary string. ... Prev by Date: ...
    (comp.lang.c)