# A good c++ prgram fro project.



## sai_cool (Apr 7, 2008)

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)

Make a project on cryptography which will allow user to use different algos like Des
Rsa, etc


----------



## Plasma_Snake (Apr 7, 2008)

I'm interested too. Tell us "How To"


----------



## sai_cool (Apr 8, 2008)

@saurabh 

pls explain in detail./ cryptography sounds really interesting.


----------



## saurabh kakkar (Apr 8, 2008)

search on internet abt cryptography and its algos like Des ,Rsa ,caesar cipher etc nd implement these algos in C++


----------



## DigitalDude (Apr 8, 2008)

compression is easier than cryptography... 

after writing compression programs you can lay your hands on cryptography 


_


----------



## sai_cool (Apr 9, 2008)

yaar, i need a small program( within 500 lines).

compression and cryto is too big, right?


----------



## DigitalDude (Apr 9, 2008)

^^^

you can do text compression 


_


----------



## sai_cool (Apr 9, 2008)

ok, how to do text compression?


----------



## DigitalDude (Apr 10, 2008)

@Sai_Cool

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

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

if you are really that clueless try this


EDIT:

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



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



I laughed so hard 


_


----------



## dheeraj_kumar (Apr 10, 2008)

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)

^^^
how many good sci-fi movies come out these days man ?? 

chutti tv is way more entertaining  


_


----------



## QwertyManiac (Apr 10, 2008)

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.


----------



## sai_cool (Apr 11, 2008)

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)

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?


----------



## DigitalDude (Apr 14, 2008)

dheeraj_kumar said:


> "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' 


_


----------



## dheeraj_kumar (Apr 15, 2008)

<offtopic>

@DigitalDude

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

</offtopic>


----------



## sai_cool (Apr 19, 2008)

yaar, lets jus leave it at this. i have already finished and submitted my project. thanks for all the help/.


----------



## QwertyManiac (Apr 19, 2008)

sai_cool - Could you post your project as an attachment here, or pastebin it?


----------



## aasisvinayak (May 8, 2008)

take up some fsf projects !!

also check out my new forum.. might be of some help


----------



## pc leone (May 8, 2008)

How to make a simple windows program in dev c++?


----------



## eggman (May 8, 2008)

I am working on *15 puzzle* solver....its good.....


----------

