473,378 Members | 1,507 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

data from text file to doubly Linked List

How can i copy data from text file to doubly Linked List
please give suggestion with code snippet
May 25 '07 #1
1 3883
mac11
256 100+
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

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

Similar topics

3
by: surrealtrauma | last post by:
I want to ask what's the differences between doubly liked list and linear liked list, and also the circular doubly liked list in terms of implementation. THX
4
by: dssuresh6 | last post by:
Whether browsing forward or backward can be done using a singly linked list. Is there any specific case where a doubly linked list is needed? For people who say that singly linked list allows...
5
by: free2cric | last post by:
Hi, how to detect head and tail in cyclic doubly link list ? Thanks, Cric
2
by: murali | last post by:
Hi, I want to insert a node in an sorted doubly linked list of integers in ascending order. The list should not have duplicate nodes. I need an algorithm (assuming an object oriented language) ...
6
by: CMoose | last post by:
I'm trying to write a program that reads data from a text file and stores it into a doubly linked list. I then want to be able to edit or sort the list. However, I'm having trouble getting started...
9
by: Hank Stalica | last post by:
So I've made a linked list class. I have a function that initiates this class, opens a file, parses it, and then inserts nodes into this temporary class. What I would like to do is then have...
5
by: adam.kleinbaum | last post by:
Hi there, I'm a novice C programmer working with a series of large (30,000 x 30,000) sparse matrices on a Linux system using the GCC compiler. To represent and store these matrices, I'd like to...
13
by: jehugaleahsa | last post by:
Hello: I got tired of trying to find good implementations of collections and other data structures in C#. So, I started implementing my own. However, data structures is a wholly different...
10
by: kalar | last post by:
Hello. we have this struct and we must to make a linked list struct node { char name; char phone; struct node *prevName; // previous node alphabetically struct node *prevNumber; //...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.