Re: Variable-sized lines of text in linked list



Scottman wrote:

I am trying to read a text file into memory without any knowledge of
how long each line will be. I am looking to store each line in a
linked list structure, however, I am unsure of how to dynamically
allocate space for each line.

Just get the (short and simple) function ggets(), in ggets.zip.
Written in portable standard C, and put in public domain. One of
the demo programs reads complete text files into memory. You will
be amazed how simple. See:

<http://cbfalconer.home.att.net/download/>

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.



--
Posted via a free Usenet account from http://www.teranews.com

.



Relevant Pages

  • Re: Exchange 2003 Private Store Corruption
    ... Once you've pulled the faulty RAM, create the new mailbox store and move ... then you can start working on the problem mailboxes. ... have DIMM's installed in pairs in this server? ... Online Diagnostic Utility says "Correctable Memory Threshold Exceeded" ...
    (microsoft.public.exchange.admin)
  • Re: Can operant conditioning account for all learning?
    ... are not replaying the raw sensory data form that event. ... problems your high level abstractions didn't recognize. ... I would suggest it uses the same amount of memory more ... Most likely the brain doesn't store things in ...
    (comp.ai.philosophy)
  • mm/ hacks -- Generic memory store?
    ... I want to do a memory management hack for generic memory stores. ... "store" for excess memory before OOM. ... RAM swap ... store would be capable of providing compression or encryption. ...
    (Linux-Kernel)
  • Re: Exchange 2003 Private Store Corruption
    ... Information Store First Storage Group: The database page read from ... Online Diagnostic Utility says "Correctable Memory Threshold Exceeded" ... the server back up and running without the faulty memory installed. ...
    (microsoft.public.exchange.admin)
  • Re: Same question - Why use a DataTable in ASP .NET?
    ... When a good deal of memory is consumed, ... For small web applications that don't get ... once you start thinking "high load" ... other words, if you have a primary key, store it in the session, not ...
    (microsoft.public.dotnet.languages.csharp)