Thread: Simple encryption program

  1. #1
    Registered User
    Join Date
    Dec 2011
    Posts
    1

    Simple encryption program

    Hello guys, i've got to write a simple encryption program whitch should change letters in words. In one file are words and in other should be a somthing like: A;1, B;2, C;3 etc.
    And program should get the words from input file -> change letters as is it set in file with encryption codes -> and make output file!

    Any ideas how can i make it?

  2. #2
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    since you posted in the C++ forum, I'd suggest you start by downloading and a C++ compiler and IDE (they are not the same thing). create a new project, and in your code, open the two input files and the output file. for each letter in the input file, look up the numeric value it should have from the translation file, and then write the translated value to the output file.

  3. #3
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,817
    Use a map<char,char> to store the cypher read from the file. Open the clear text file and loop char-by-char outputting what you've read into the map for that given character.
    "Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
    -Christopher Hitchens

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. "Stray Character" when running a simple encryption program.
    By manasij7479 in forum C++ Programming
    Replies: 2
    Last Post: 08-06-2011, 09:20 AM
  2. RFC - Simple Encryption
    By Nor in forum C++ Programming
    Replies: 11
    Last Post: 02-16-2009, 04:59 PM
  3. Simple Xor Encryption help
    By soadlink in forum Windows Programming
    Replies: 13
    Last Post: 10-18-2006, 11:51 AM
  4. Simple Encryption Program
    By xamlit in forum C Programming
    Replies: 4
    Last Post: 12-29-2005, 10:03 PM
  5. Simple message encryption
    By Vicious in forum C++ Programming
    Replies: 10
    Last Post: 11-07-2004, 11:48 PM

Tags for this Thread