Linked list and Struct Help!!!

This is a discussion on Linked list and Struct Help!!! within the C Programming forums, part of the General Programming Boards category; I am trying to get fscanf to input properly into a linked list for example Code: equipment.txt shield 50 protects ...

  1. #1
    Registered User
    Join Date
    Apr 2004
    Posts
    14

    Linked list and Struct Help!!!

    I am trying to get fscanf to input properly into a linked list

    for example

    Code:
    equipment.txt
    
    shield
    50
    protects torso against sword strikes
    
    helmet
    25
    protects head against sword strikes looks cool.
    so the struct would be

    char
    int
    char

    the text file may change file so i would need help setting it up for dynamic memory allocation.

    any ideas?


  2. #2
    Welcome to the real world
    Join Date
    Feb 2004
    Posts
    50
    What are you having problems with: writing a structure and its members to a file, updating a file, getting user input, etc...

    If you have any code, you should post that also. Thanks.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Link List math
    By t014y in forum C Programming
    Replies: 17
    Last Post: 02-20-2009, 06:55 PM
  2. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 04:00 PM
  3. Linked List Help
    By CJ7Mudrover in forum C Programming
    Replies: 9
    Last Post: 03-10-2004, 10:33 PM
  4. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM
  5. Contest Results - May 27, 2002
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 06-18-2002, 02:27 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21