ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I don't know if there's a good book specifically for linked lists, but I learned C with the textbook "C By Dissection". As far as I can remember, it was pretty good.
What kind of problem are you having? I've written a few programs that use linked lists...
thx for the reply the trouble is want to read data from a file into linked list (no prob)
the i want to do a match strstr()(no prob)
but the i want wath i matched put into a temporary list
so i can do some aother function
i want to post my code but i am at work and typing it out of head is no option when i return at my home i will post if nessecary
Do you want all the matched nodes in a separate list or just have them discarded? Either way it's possible. You would have to deallocate the node memory if you wanted to get rid of it, or else add it to the new list.
i want to put them in a seperate linked list
is it also possible to edit something
like the user performs a search and then
edit the search with backspace arrows and typing new data
like a text editor o like a shell where you can edit your command when you typed it in
fuctionality if you typed an author or example that you can edit like
you do in bash with your arrows
if i typed R. Richard Stevens
and it supposed to be W. Richard stevens
take your key go to the first R backspace or delete and
put the new letter
like you would edit a command in your bash when you et it out of your HISTFILE and you edit it for another purpose
Again, for Gtk or I to give you good information, we'd need to see some source.
However, let me say this. You've already got the code to support your file-based linked list. Why not use that foundation of code to support another linked list? There's no rule that says you can only have one linked list in a program. For the first list, you created a node for every line of the file. For the second list, create a node for each "match" you find in your original.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.