DIGIT-ARC read-only archive · snapshot: July 23, 2026

A good c++ prgram fro project.

22 posts · originally from https://geek.digit.in/community/threads/a-good-c-prgram-fro-project.84713/

S
sai_cool Original post #1
Apr 7, 2008 at 9:11 PM
Guys,

I have to do a project for my computer science exam.

I want to do somethin nice, but without using any graphics.

pls gimme some ideas. i would really appreciate it..

thanks...
saurabh kakkar
Apr 7, 2008 at 9:17 PM
Make a project on cryptography which will allow user to use different algos like Des
Rsa, etc
Plasma_Snake
Apr 7, 2008 at 9:52 PM
I'm interested too. Tell us "How To":))
S
Apr 8, 2008 at 7:03 AM
@saurabh

pls explain in detail./ cryptography sounds really interesting.
saurabh kakkar
Apr 8, 2008 at 9:27 PM
search on internet abt cryptography and its algos like Des ,Rsa ,caesar cipher etc nd implement these algos in C++
DigitalDude
Apr 8, 2008 at 10:02 PM
compression is easier than cryptography...

after writing compression programs you can lay your hands on cryptography :D


_
S
Apr 9, 2008 at 9:45 PM
yaar, i need a small program( within 500 lines).

compression and cryto is too big, right?
DigitalDude
Apr 9, 2008 at 10:12 PM
^^^

you can do text compression :D


_
S
Apr 9, 2008 at 11:45 PM
ok, how to do text compression?
DigitalDude
Apr 10, 2008 at 12:28 AM
@Sai_Cool

dude we can only show the puzzle :p you have to seek and find the way out of it :p ;)

come back again if you have any problems in the code or if you are stuck somewhere :D

if you are really that clueless try this


EDIT:

lol dheeraj chill yaar :lol: I understand your feelings thats why I have my present signature :p

Text compression? simple. write whatever you want on an a4 sheet, and crush it into a ball.

I laughed so hard :p


_
dheeraj_kumar
Apr 10, 2008 at 3:05 PM
Hey all, I'm sorry I blew off my steam, but I'm not sorry about what I said. I feel my feelings are justified.

Anyway sai_cool, I'm sorry if I made a big thing of your simple request, but you better start learning, mate.

Just as I said in my rant, google "text compression" and check the first page. They have lots of information including sample code.


<off topic>

@DigitalDude
Geeks are supposed to watch sci-fi movies, not Chutti-TV.
DigitalDude
Apr 10, 2008 at 4:45 PM
^^^
how many good sci-fi movies come out these days man ?? :D

chutti tv is way more entertaining :p ;)


_
QwertyManiac
Apr 10, 2008 at 10:33 PM
Hmmm..

sai_cool - Basic text compression works on the morse-code principles. An E in a morse code is just one character (Reason is because E is used most often of all characters). While a Q has a higher length.

E = .
Q = --.-

Now you can see why this is acceptable - E is used a lot and needs to be transmitted quick and Q hardly appears generally and is not that important so its given a longer length representation.

Similarly text compression can be done in 3 steps:

1. Get the input. Now check the input for all its characters and find the probability of each. Like if the length is 4 ("ABCA") then A's probability of occurance is 2/4, B's and C's is 1/4 each.

2. Assign unique code words for each of these characters. Like for example am gonna assign a binary bit 0 for A and 10 for B and 11 for C. You can see that when I thus make the string in binary compressed form as 0.10.11.0 the total length reduces to 6 bits (This binary format 010110) from 4 bytes (Each character is a byte) of ABCA.

(Neglect the dots, they are for better visualizing)

3. To decode this format you have to make the decoder know what symbol is assigned to what. And once your decoder knows that its easy for you to decode.

What I've just demonstrated above is the Variable Length (Size of the unique code word for each character changes) method. This is the most basic style of text compression. There are 2-3 algorithms to assist you in generating the code word table, they are Huffman Coding method and Shannon-Fano coding method.

Explaining them to you is beyond the scope of this post since they are relatively simple methods you can check in the links provided and ask certain large doubts if you've got them.

(Assuming you know how trees work, else learn basic data structures first and then get into such programming levels)

Tip: Shannon Fano coding is fairly easier than Huffman coding.
S
sai_cool #14
Apr 11, 2008 at 7:26 AM
Thanks Qwerty!

i know file handling, so i think i can go ahead with the project.
Thanks for explaning the concept behind it.
Now u are a good guy, unlike that Dheeraj !
dheeraj_kumar
Apr 14, 2008 at 8:06 PM
Some mod deleted my looong reply to you, I guess. Too offensive? sorry mods :)

Anyway, I made my point quite clear. I highly suggest you read through my post once again. I dont mind being rude and arrogant as long as people learn something. I frankly shouldnt have cared if you leeched or not, nevermind *shrugs shoulders*

have fun, and learn something pl0x.

and hey, i dont really care about being branded as an idiot or a bad guy. my way of life is "dont care whatever the other person thinks about you unless its a she, and she is good looking, and she is single"

so, who cares about what a little noob says? :D
DigitalDude
Apr 14, 2008 at 8:39 PM
"dont care whatever the other person thinks about you unless its a she, and she is good looking, and she is single"
nice policy.. add to it 'and her father is rich' :p


_
dheeraj_kumar
Apr 15, 2008 at 4:26 AM
<offtopic>

@DigitalDude

heh heh... remember boys... no leeching :D applies to everything lolz

</offtopic>
S
sai_cool #18
Apr 19, 2008 at 12:05 PM
yaar, lets jus leave it at this. i have already finished and submitted my project. thanks for all the help/.
QwertyManiac
Apr 19, 2008 at 3:28 PM
sai_cool - Could you post your project as an attachment here, or pastebin it?
aasisvinayak
May 8, 2008 at 1:25 AM
take up some fsf projects !!

also check out my new forum.. might be of some help :)
P
pc leone #21
May 8, 2008 at 7:24 AM
:confused:How to make a simple windows program in dev c++?
eggman
eggman #22
May 8, 2008 at 10:19 AM
I am working on 15 puzzle solver....its good.....