file concept

This is a discussion on file concept within the C Programming forums, part of the General Programming Boards category; So, you are going to have line breaks in there. Then you need to strip them out before doing any ...

  1. #16
    Registered User
    Join Date
    Jan 2009
    Posts
    1,485
    So, you are going to have line breaks in there. Then you need to strip them out before doing any comparison. But there is still a problem if you supply a text that is larger than 256 and 'hello' is the last of one read and 'world' is the first of the next.

  2. #17
    Registered User
    Join Date
    Dec 2006
    Posts
    136
    Quote Originally Posted by Subsonics View Post
    So, you are going to have line breaks in there. Then you need to strip them out before doing any comparison. But there is still a problem if you supply a text that is larger than 256 and 'hello' is the last of one read and 'world' is the first of the next.
    that is what i am asking, please help me, rewrite the code.

    if anybudy is there to solve this problem

  3. #18
    Registered User
    Join Date
    Jan 2009
    Posts
    1,485
    Or use getc() and do one char at a time.

  4. #19
    Registered User
    Join Date
    Dec 2006
    Posts
    136
    any experts is there to rewrite the small program the above given;

    only experts.. please..

    any help it should be appreciable.

  5. #20
    Registered User
    Join Date
    Dec 2006
    Posts
    136
    anybudy is there.

  6. #21
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    It's an odd assignment, because the target words are split without being at the end of the word, on the last line of the input file.

    I finished my version, but I won't burden you with it - it's undoubtedly not expert enough to suit you.


Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Encryption program
    By zeiffelz in forum C Programming
    Replies: 1
    Last Post: 06-15-2005, 03:39 AM
  2. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  3. Making a LIB file from a DEF file for a DLL
    By JMPACS in forum C++ Programming
    Replies: 0
    Last Post: 08-02-2003, 08:19 PM
  4. Hmm....help me take a look at this: File Encryptor
    By heljy in forum C Programming
    Replies: 3
    Last Post: 03-23-2002, 09:57 AM
  5. Need a suggestion on a school project..
    By Screwz Luse in forum C Programming
    Replies: 5
    Last Post: 11-27-2001, 01:58 AM

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