how to make this program ( very simple ) ? [<< newbie ]]

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Mar 2008
Posts: 12
Reputation: quecoder is an unknown quantity at this point 
Solved Threads: 0
quecoder quecoder is offline Offline
Newbie Poster

how to make this program ( very simple ) ? [<< newbie ]]

 
0
  #1
May 4th, 2008
Hello ,
Please I want some help in making this small program :

the program looks for 3 or more repeated similar letters and replaces them with two characters , the first is the letter itself ( value ) , and the second character is the number of times it repeated ( count ).

Example :
AAACCMMZZZZ

Converted to :
A3\CC\MM\Z4

( less than three repeats , will be ignored, because when converted , it will contain 2 characters for the count and value , so , no difference in size for the two letter repeats )

it's a means for compressing text files ( r.l.e )
I want to know how to make a windows application that asks the user to browse for the file , and then convert it using the technique i mentioned .
OR
asks him for a compressed file and then restores it back to the original version...

ANY help is appreciated ...
Last edited by quecoder; May 4th, 2008 at 7:58 pm.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 2,641
Reputation: Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light 
Solved Threads: 245
Jx_Man's Avatar
Jx_Man Jx_Man is offline Offline
Posting Maven

Re: how to make this program ( very simple ) ? [<< newbie ]]

 
0
  #2
May 5th, 2008
post your code...
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 10
Reputation: corwing is an unknown quantity at this point 
Solved Threads: 0
corwing corwing is offline Offline
Newbie Poster

Re: how to make this program ( very simple ) ? [<< newbie ]]

 
0
  #3
May 6th, 2008
Quecoder may just need direction and not actual code help yet. Sometimes we just need guidance, not the exact answer.

Ya know like
Get the user's input put it to a string and then parse the string for the first character and then while you do that do a read ahead, if the next character is the same do a read ahead again, repeat until you reach a different character. At that point into the output string you'll want to put in the character you just checked and the count (if count <3 then put in two of the character), then from the position you left off at +1 you will check that character in the string then repeat the read ahead loop again. It is rather simple really. If you need help getting started with coding I suggest you take classes or do some reading and then when you think you're getting there but are stuck, post code and ask for help.
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 12
Reputation: quecoder is an unknown quantity at this point 
Solved Threads: 0
quecoder quecoder is offline Offline
Newbie Poster

Re: how to make this program ( very simple ) ? [<< newbie ]]

 
0
  #4
May 6th, 2008
thank you corwing , it helped a lot ...
I need to read some and post code as you said ..
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C# Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC