Can somebody suggest a "C lang" project with pointers and linked lits for beginner?

Discussion in 'C Programming' started by santa19992000@yahoo.com, Oct 15, 2005.

  1. Guest

    Guys:
    Can somebody suggest a "C lang" project with pointers and linked lits
    for beginner?. Also is there anywahere I can find some C projects?.
    Thanks in advance.
    , Oct 15, 2005
    #1
    1. Advertising

  2. Malcolm Guest

    <> wrote
    > Guys:
    > Can somebody suggest a "C lang" project with pointers and linked lits
    > for beginner?. Also is there anywahere I can find some C projects?.
    > Thanks in advance.
    >Bible editor.


    Get an online bible.

    The task is to load it into memory. When the user types chapter and verse,
    the verse should appear on screen. He can then add a footnote, which is
    stored as text in square brakets, or change the translation. Finally he can
    save his changes.

    The best way to inplement this is to have a linked list of verses. There is
    too much text to shift about in memory with each edit.
    Malcolm, Oct 15, 2005
    #2
    1. Advertising

  3. Re: Can somebody suggest a "C lang" project with pointers andlinked lits for beginner?

    "Malcolm" <> writes:
    > <> wrote
    >> Guys:
    >> Can somebody suggest a "C lang" project with pointers and linked lits
    >> for beginner?. Also is there anywahere I can find some C projects?.
    >> Thanks in advance.
    >>Bible editor.

    >
    > Get an online bible.
    >
    > The task is to load it into memory. When the user types chapter and verse,
    > the verse should appear on screen. He can then add a footnote, which is
    > stored as text in square brakets, or change the translation. Finally he can
    > save his changes.
    >
    > The best way to inplement this is to have a linked list of verses. There is
    > too much text to shift about in memory with each edit.


    If you read the entire Bible into a single linked list of verses,
    you're going to spend most of your time traversing it.

    A better data structure would be a list of books, where each book is a
    list of chapters, and each chapter is a list of verses. At each
    level, the "list" can be implemented either as a linked list, or as an
    array of pointers. Each array can be allocated using malloc(), and
    resized if necessary using realloc() (e.g., if you decide to add a
    chapter or verse here and there). Using just linked lists should give
    you acceptable performance; using a hierarchy means all your lists are
    shorter than 200 elements.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
    We must do something. This is something. Therefore, we must do this.
    Keith Thompson, Oct 15, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peng Yu
    Replies:
    0
    Views:
    1,128
    Peng Yu
    Aug 14, 2003
  2. Sean
    Replies:
    2
    Views:
    631
    loufoque
    Sep 24, 2006
  3. Suresh
    Replies:
    2
    Views:
    338
    Arne Vajhøj
    Nov 25, 2007
  4. Suresh
    Replies:
    0
    Views:
    316
    Suresh
    Nov 24, 2007
  5. cerr

    pointers, pointers, pointers...

    cerr, Apr 7, 2011, in forum: C Programming
    Replies:
    12
    Views:
    657
Loading...

Share This Page