i have no clue how to do this any help is greatly appreciated!!!!!!!!
i need to be able to enter 4 values 2 integers and 2 strings and put them in a linkedlist and store them in a .dat file for further use.
This is a discussion on how can i enter values in a linked list and write then to a file???? within the C Programming forums, part of the General Programming Boards category; i have no clue how to do this any help is greatly appreciated!!!!!!!! i need to be able to enter ...
i have no clue how to do this any help is greatly appreciated!!!!!!!!
i need to be able to enter 4 values 2 integers and 2 strings and put them in a linkedlist and store them in a .dat file for further use.
Originally posted by Unregistered
i have no clue how to do this any help is greatly appreciated!!!!!!!!
i need to be able to enter 4 values 2 integers and 2 strings and put them in a linkedlist and store them in a .dat file for further use.That's the structure you need. Now just enter values and implement it like a single linked list ( or even a double-linked list).Code:struct link { int val1; int val2; char *string1; char *string2; link *nextLink; } ;
"How can I enter values in a linked list and write them to a file?"
Well first, you enter them into a linked list...
Then you write them into the file...
Quzah.
Hope is the first step on the road to disappointment.
just use the fwrite() function.
Gays can't love like real people
entropysink.com -- because arses weren't designed for running websites.
*smirk* Or how about that "scary" fprintf.
Quzah.
Hope is the first step on the road to disappointment.