Thread: Help!!!

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    27

    Help!!!

    I am writing my program that compares strings input from 2 txts files if they are different they write to the third. the program does all the compareing and writing to the third file with no problems however the problem i am having is getting it to display that file.

    I have wrote

    fn3 is a file pointer
    Code:
    while (fgets(filebuff,MAX_LEN,fn3) != NULL)
    {
       if (filebuff[0]  == '\n')
      {
         printf("The file was empty!!!");
         break;
      }
      else
      printf("%s \n",fn3)
    }
    I am sure i am missing something but can think what, can anyone help!!!





    }

  2. #2
    Unregistered
    Guest

    Hehe

    try: printf("%s",readbuf);
    Maybe works better ;-)

  3. #3
    Unregistered
    Guest

    oops

    I mean printf("%s",filebuff);

Popular pages Recent additions subscribe to a feed