Compressing a file, then uncompressing

This is a discussion on Compressing a file, then uncompressing within the C Programming forums, part of the General Programming Boards category; I have tried and gotten most of it, I put a comment by the else "//must be a digit. Build ...

  1. #1
    Registered User
    Join Date
    Nov 2010
    Posts
    25

    Compressing a file, then uncompressing

    I have tried and gotten most of it, I put a comment by the else "//must be a digit. Build a number." Where I need the help. Some notes:
    There is a 100 word upper limit on the number of different words in the input file. The end of the input file is signified by the number 0 on a line by itself. The terminating 0 merely indicates the end of the input and should not be part of the output produced.
    A word is defined to be a maximal sequence of upper- and lower-case letters. Words are case-sensitive - the word abc is not the same as the word Abc.
    Last edited by dsured; 03-09-2011 at 08:46 AM. Reason: N/a

  2. #2
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    I would treat digits as just char's, and not as numbers.

  3. #3
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Adak View Post
    I would treat digits as just char's, and not as numbers.
    Yep... and groups of digits as a word.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 3
    Last Post: 11-11-2010, 11:05 AM
  2. sequential file program
    By needhelpbad in forum C Programming
    Replies: 80
    Last Post: 06-08-2008, 01:04 PM
  3. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  4. archive format
    By Nor in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 08-05-2003, 07:01 PM
  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