| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi people, I am really in a big mess here. I need to grab formatted input from a file and store it in a dynamically allocated linked list. Here is how the input file will look like:
From bob@buildr.com Mon Jan 21 16:34:15 2006 From: bob@buildr.com Date: Mon, 21 Jan 2006 16:34:15 +1100 Message-Id: <200601210534.g0L5YFr01544@buildr.COM> To: c021@gmail.com Subject: test message Priority: High Status: This is a message. Bob There will be a couple of these emails... And yeah, i need to store that in what im guessing will be a linked list? I understand that I will be having to use "fopen()" and im guessing that I will have to use "fgets()" as well since "fscanf()" won't work very well, and of course malloc. The real problem that I am having is creating the loop that will go through the input file and store everything in the structured list. I am using C not C++. Any help at all would be appreciated. Thanks in advance! |
![]() |
| Viewing: Dev Articles Community Forums > Programming > C/C++ Help > Input from file into structure |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|