Help!!!

This is a discussion on Help!!! within the C++ Programming forums, part of the General Programming Boards category; I am writing my program that compares strings input from 2 txts files if they are different they write to ...

  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

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