Linked List

Hello guys!

I want know how to open a file and take all your content in a linked list.

tks!

Last edited on
http://en.wikipedia.org/wiki/Linked_list

What are you going to put in each node? Bytes or more complex data?
Hi.

I don't speak english very well, but I'll try... :)

I have this struct:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
typedef char String[40];

typedef struct
{
     int codigo;
     String titulo;
     String autor;
     String editora;
     float preco;
     int qtdeEstoque;
} LIVRO;

struct lista
{
     LIVRO dados;
     struct lista *proximo;
}*inicio;


and I need to save all the content in a file.txt...
and when I start the program I need to load all to a linked list, before I use the program I'll save the new file.txt...
Last edited on
Help me please!
What exactly is your problem?
How to open a file you will find here : http://www.cplusplus.com/doc/tutorial/files/
Topic archived. No new replies allowed.