Thread: Compressing a file, then uncompressing

  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 09: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, 12:05 PM
  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, 02:58 AM