Thread: Decoding

  1. #1
    Registered User
    Join Date
    Oct 2009
    Posts
    3

    Decoding

    Hi Guys,

    Working on an encoding and decoding example and have the encoding working fine. Its the decoding that is proving to be a challenge...

    Essentially, I am encoding characters like:

    ttttrrrrruuuuhhhyyiii

    to give output like

    4t5r4u3h2y3i

    and thats fine, its just when i want to decode something like:

    2t3y2r to ttyyyrr

    is where i have diffculties

    I have tried a few different ways but I'm stumped and would greatly appreciated a few pointers.

    I think its the printf where im going wrong, I cant seem to grasp how to tell the program to print t twice (above example) when 2 is in front of it

  2. #2
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Chappell Hill, Texas
    Posts
    2,332
    methinks you forgot to post your code.
    Mainframe assembler programmer by trade. C coder when I can.

  3. #3
    {Jaxom,Imriel,Liam}'s Dad Kennedy's Avatar
    Join Date
    Aug 2006
    Location
    Alabama
    Posts
    1,065
    Your problem is on line 26, just before the return.














    That'd be POST YOUR CODE!!!!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help with decoding program...
    By porsche911nfs in forum C++ Programming
    Replies: 18
    Last Post: 04-10-2009, 12:21 AM
  2. Help decoding base_64+GZipped string
    By Zeokat in forum C# Programming
    Replies: 3
    Last Post: 12-05-2008, 05:06 PM
  3. Decoding applications?
    By Hybird in forum C++ Programming
    Replies: 2
    Last Post: 11-13-2005, 07:19 AM
  4. Decoding
    By jk81 in forum C Programming
    Replies: 4
    Last Post: 11-12-2002, 11:24 PM
  5. Decoding & Encoding the sound?!?
    By waldis in forum C++ Programming
    Replies: 2
    Last Post: 10-20-2002, 06:41 PM