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.
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.
*smirk* Or how about that "scary" fprintf.
Quzah.
Hope is the first step on the road to disappointment.