ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
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.
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.