Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 109,554 C++ Programmers for FREE! Ask your question and get quick answers from experts. There are 1,326 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



Encrypting with C++

 
Reply to this topicStart new topic

Encrypting with C++, Encryption and Decryption

isa2299
post 7 Aug, 2008 - 07:12 AM
Post #1


New D.I.C Head

*
Joined: 7 Aug, 2008
Posts: 2

Good day.

I started programming lesson recently. I have been using the C++. I know how to use pseudo code mainly. Again, I know how to use it for solving expressions and so on. I got hooked up when it came to encrpting just 10 words and I spent hours without success. The format I want to use is that in which each letter is replaced bythe next in the alphabet.
Again, I know of the flow-chart, connectors, loops etc but I couldnt find any shapes on the C++ work space. When I wentto microsoft word to copy the shapes, it was of no avail. A clarificartion will be highly appreciated! I see the surrounding quite programmy!

This post has been edited by isa2299: 7 Aug, 2008 - 07:14 AM
User is offlineProfile CardPM

Go to the top of the page


KYA
post 7 Aug, 2008 - 07:21 AM
Post #2


#include <nerd.h>

Group Icon
Joined: 14 Sep, 2007
Posts: 2,932



Thanked 22 times

Dream Kudos: 1150
My Contributions


Shapes? Ideally, you could write your own encryption mechanism, pseudo code might look something like this:

cpp

function Encrypt
read through inputted string/array
for each element in the array
change current item to next letter in the alaphbet, etc...
print out encrypted array
decrypt if you want (requires you to write that function as well
will be the reverse of encrypt
User is offlineProfile CardPM

Go to the top of the page

isa2299
post 7 Aug, 2008 - 07:38 AM
Post #3


New D.I.C Head

*
Joined: 7 Aug, 2008
Posts: 2

Thanks alot. Is it that to encrypt words, u dont need printf and scanf? May be I havent reached the stage but then do u know how to get the shapes used in flow chart? i know how to use but checked C++ package and couldnt find them.

This post has been edited by isa2299: 7 Aug, 2008 - 07:39 AM
User is offlineProfile CardPM

Go to the top of the page

KYA
post 7 Aug, 2008 - 07:40 AM
Post #4


#include <nerd.h>

Group Icon
Joined: 14 Sep, 2007
Posts: 2,932



Thanked 22 times

Dream Kudos: 1150
My Contributions


If you want the user to enter a string then yes, you will need printf and scanf. What's with the shapes? If you want to display a flowchart you'll need a lot more for this program, specifically a API for the graphics. If you want to draw a flowchart on paper to outline program flow, then i would suggest looking online for some good information--there's lots of it out there.
User is offlineProfile CardPM

Go to the top of the page

UG Cyber
post 7 Aug, 2008 - 09:16 PM
Post #5


New D.I.C Head

*
Joined: 24 Jul, 2008
Posts: 32

To get a list of the basic 'shapes' and stuff just compile this....

CODE

#include <iostream>
using namespace std;

int main(void)
{
   for (int i = 0;i<255;i++)
   {
      cout << i << " : " << (char) i << endl; //Display the int value and the Char Value of the int
    }
   system("pause");  //So you can see the output
   return 0;
}


Its not a great code or anything but it will display the ascii table and the deci value.
Keep in mind there are white spaces included such as (char) 32 would be space, (char) 10 would be
'Return' ...ect.

If you want to keep it as simple as you can i would just use the ascii and have fun =)
User is offlineProfile CardPM

Go to the top of the page

Reply to this topicStart new topic
Time is now: 9/7/08 11:01PM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month