Registered: Nov 2001
i have just started a new business. I am creating a program but as C isn't my specialist subject I need some help for this.
This website has come highly recommeneded and I hope you can help me. For the program I want to read from a text
file called which I've called id.txt this contains characters and numbers
The program will then read the numbers and generate a sorted dynamic linked list. I want this to be done from the
(largest to smallest), where each node of the linked list would contain a single integer. The program should then
traverse the linked list the resultant linked list on screen.
I have already stared by readying in the file but am stuck with the link list. What i've done is shown below.
FILE *INFO-FILE; /*FILE POINTER*/
if ( (INFO-FILE = fopen( Myfile,"r")) == NULL)
printf("Can't open %s\n",Myfile);
printf("\nThis program is designed by David\n");
printf("1 - Reads the text file\n");
printf("2 - creates a linklist between text file\n");
printf("3 - print output\n");
printf("4 - Any other number enter return void\n");
printf("please enter your choice");