468,553 Members | 1,429 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,553 developers. It's quick & easy.

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

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.

Nov 15 '05 #1
2 1164

<sa***********@yahoo.com> 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.

Nov 15 '05 #2
"Malcolm" <re*******@btinternet.com> writes:
<sa***********@yahoo.com> 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) ks***@mib.org <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.
Nov 15 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Genzo | last post: by
1 post views Thread by lucanos | last post: by
388 posts views Thread by maniac | last post: by
2 posts views Thread by Matt Suther | last post: by
4 posts views Thread by bill tie | last post: by
12 posts views Thread by filia&sofia | last post: by
1 post views Thread by UniDue | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.