business program

This is a discussion on business program within the C Programming forums, part of the General Programming Boards category; i have just started a new business. I am creating a program but as C isn't my specialist subject I ...

  1. #1
    Registered User
    Join Date
    Nov 2001

    Question business program

    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.


    open(char *Myfile)

    if ( (INFO-FILE = fopen( Myfile,"r")) == NULL)
    printf("Can't open %s\n",Myfile);

    int choice;
    char c;

    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");

    case 1:


    while((c=getc(INFO-FILE)) != EOF)


    case 2:

    case 3:

    printf("ERROR***** ERROR******ABORT******\n");

    return; /*FINISH*/

  2. #2
    Registered User jasrajva's Avatar
    Join Date
    Oct 2001
    you have got the skeleton code ready
    what you really need to do is seach google or someplace for linked lists and read up on them
    they are very simple really and shouldnt take you more than a coupla hours to get your program running

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help with a program, theres something in it for you
    By engstudent363 in forum C Programming
    Replies: 1
    Last Post: 02-29-2008, 01:41 PM
  2. Replies: 4
    Last Post: 02-21-2008, 10:39 AM
  3. Using variables in system()
    By Afro in forum C Programming
    Replies: 8
    Last Post: 07-03-2007, 01:27 PM
  4. BOOKKEEPING PROGRAM, need help!
    By yabud in forum C Programming
    Replies: 3
    Last Post: 11-16-2006, 11:17 PM
  5. My program, anyhelp
    By @licomb in forum C Programming
    Replies: 14
    Last Post: 08-14-2001, 11:04 PM

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