| | |
how to make this program ( very simple ) ? [<< newbie ]]
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Mar 2008
Posts: 12
Reputation:
Solved Threads: 0
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 ...
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.
post your code...
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
So, Please do something before post your thread.
* PM Asking will be ignored *
•
•
Join Date: Apr 2008
Posts: 10
Reputation:
Solved Threads: 0
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.
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.
![]() |
Similar Threads
- Math Program Help (Python)
- Newbie needs help... ;) (Pascal and Delphi)
- hi from newbie judych (Getting Started and Choosing a Distro)
- Need advice & help with a very simple program (IT Professionals' Lounge)
- Java newbie (Java)
- newbie c++ help (C++)
- C++ help for a newbie (C++)
- No make File (PHP)
- newbie needs help, basic mfc stuff (C++)
- I am a girl doing my 1st simple program (C)
Other Threads in the C# Forum
- Previous Thread: i need help!!!
- Next Thread: Set NET version in VS2008?
| Thread Tools | Search this Thread |
.net access ado.net algorithm array barchart bitmap box broadcast buttons c# chat check checkbox client color combobox control conversion csharp custom database databasesearch datagrid datagridview dataset datetime degrees development draganddrop drawing encryption enum event excel file files focus form format forms function gdi+ httpwebrequest image index input install java label list listbox listener mandelbrot math mouseclick mysql networking object operator path photoshop picturebox pixelinversion post prime programming radians regex remote remoting richtextbox save saving serialization server sleep socket sql statistics stream string table tcp text textbox thread time timer treeview update usercontrol validation view visualstudio webbrowser windows winforms wpf xml







