Jump to content


Photo

C++ Help


  • Please log in to reply
2 replies to this topic

#1 JakeWebz

JakeWebz

    Young Padawan

  • Members
  • Pip
  • 1 posts

Posted 13 June 2005 - 08:18 AM

Okay, i'm trying to make a C++ Encrpyter. Does anyone know how to replace things in the code?

Such as:

if (currenttext = 10242) currenttext = A;
if (currenttext = 10243) currenttext = B;

something like that, but so i can repalce whole lines of numbers w/ letters? Thanks

#2 ronson

ronson

    Banned For Being Purple

  • Twodded Staff
  • PipPip
  • 480 posts
  • Gender:Male
  • Location:North Yorkshire, UK
  • Interests:Rugby, Programming, Building Computers, Networking, Web Design and...........BINGE DRINKING!!!!!!.

Posted 23 June 2005 - 08:11 PM

Maybe use select case? Make an array of variables and assign each letter a unqiue number?

#3 reZo

reZo

    Young Padawan

  • Members
  • Pip
  • 9 posts
  • Gender:Male
  • Interests:Web development, system administration, music.

Posted 15 July 2005 - 01:31 AM

I would strongly you read tutorials about C++ and encryption & decryption.

However, I have writen a 'encryption' or so called 'encryption' source below:

#include <iostream>
#include <string>
using namespace std;

int main()
{
    char letter;
    int let;
    letter = let;
   
    cout << "\n\n\n  Please enter a number you wish to be \'encrypted\': ";
    cin >> let;
    cout << "\n\n\n  " << letter << " is " << let << endl;
    cin.get();
    cin.get();
   
    return 0;
}


I hope you understand how the above works. If not, read from www.cprogramming.com or buy a book.

Thanks, hope it helped.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users