By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,367 Members | 1,369 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,367 IT Pros & Developers. It's quick & easy.

data from text file to doubly Linked List

P: 1
How can i copy data from text file to doubly Linked List
please give suggestion with code snippet
May 25 '07 #1
Share this Question
Share on Google+
1 Reply


100+
P: 256
How can i copy data from text file to doubly Linked List
please give suggestion with code snippet
I won't provide any code because it would be a waste of time (since I have no idea what data your trying to work with and your question is too vague)

In general you have some method for inserting an item into your list. You don't copy directly into a linked list, you add links one by one.
1. Fetch data to put in linked list using fread() (or whatever you do to read a file) - read into a temporary memory location
2. use whatever method allows you to insert into your list to put the data you just fetched into your list
3. if you have more data go back to #1

Provide more details if this isn't helpful advice. What exactly are you trying to do and where are you stuck? Are you trying to implement the list insertion method?
May 25 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.