codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
This 23 message thread spans 2 pages:  < <   1  [2] > >  
  Re: Lost part 2!!!  newProgrammer19 at 06:11 on Monday, December 11, 2006
 

did you compile this?

  Re: Lost part 2!!!  newProgrammer19 at 20:20 on Monday, December 11, 2006
 

ya so what wrote for the goUserEdit function worker great, how do we get gid rid of all the other cin?

  Re: Lost part 2!!!  Gord T at 03:12 on Tuesday, December 12, 2006
 

There are only 4 more cin's. I have already explained how to handle all of the cases. By now you should know how to do this. If not, please re-read my previous comments and try to understand better, then experiment.



<Added>

http://msdn2.microsoft.com/en-gb/library/89e4h321.aspx


  Re: Lost part 2!!!  newProgrammer19 at 09:34 on Wednesday, December 13, 2006
 

ya i understand. i am attempting to study encryption and decryption, please help me with these guidlines.

Implement the class Crypto
Implement TOTAL of five (5) different encryption/decryption functions
Allow the user to save the cipher text to a file.
Implement a program that lets a user encrypt/decrypt text using your Crypto class functions
Your program must allow the user to continue encrypting/decrypting text until he/she chooses to quit
Your program must allow the user to choose any of the encryption functions you implemented in the class Crypto.
Allow the user to enter a line of plain text, and encrypt it--show the user the encrypted text AND the original clear text
Allow the user to enter a line of encrypted text, and decrypt it-- show the user the clear text that results from decryption AND the original encrypted text
Display must be well formatted
Keep the user interface as clean, logical, and simple as possible

here is all that i have in this, the needs to be done with that CinReader thing.






  Re: Lost part 2!!!  newProgrammer19 at 09:41 on Wednesday, December 13, 2006
 

here is the .cpp file

#include "crypto.h"

Crypto::Crypto ()
{
cout << "building a Crypto instance\n\n";
}

Crypto::~Crypto ()
{
cout << "destroying a Crypto instance\n\n";
}

string Crypto::eCaesar (string text)
{
int asciiValue = 0;
for (int i=0; i<text.length(); i++)
{
if (isalpha(text))
{
asciiValue = static_cast<int>(toupper(text));
asciiValue += 3;
if (asciiValue > 90)
asciiValue -= 26;

text = static_cast<char>(asciiValue);
}
}

cipherText = text;
return cipherText;
}

string Crypto::dCaesar (string text)
{
int asciiValue = 0;
for (int i=0; i<text.length(); i++)
{
if (isalpha(text))
{
asciiValue = static_cast<int>(toupper(text));
asciiValue -= 3;
if (asciiValue < 65)
asciiValue += 26;

text = static_cast<char>(asciiValue);
}
}

clearText = text;
return clearText;
}




  Re: Lost part 2!!!  newProgrammer19 at 09:42 on Wednesday, December 13, 2006
 

here is the header file

#include "crypto.h"

Crypto::Crypto ()
{
cout << "building a Crypto instance\n\n";
}

Crypto::~Crypto ()
{
cout << "destroying a Crypto instance\n\n";
}

string Crypto::eCaesar (string text)
{
int asciiValue = 0;
for (int i=0; i<text.length(); i++)
{
if (isalpha(text))
{
asciiValue = static_cast<int>(toupper(text));
asciiValue += 3;
if (asciiValue > 90)
asciiValue -= 26;

text = static_cast<char>(asciiValue);
}
}

cipherText = text;
return cipherText;
}

string Crypto::dCaesar (string text)
{
int asciiValue = 0;
for (int i=0; i<text.length(); i++)
{
if (isalpha(text))
{
asciiValue = static_cast<int>(toupper(text));
asciiValue -= 3;
if (asciiValue < 65)
asciiValue += 26;

text = static_cast<char>(asciiValue);
}
}

clearText = text;
return clearText;
}




<Added>

oops here is the header file....

#pragma once

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

class Crypto
{
public:

Crypto (); // constructor
~Crypto (); // destructor

string eCaesar (string text);
string dCaesar (string text);

private:

string clearText;
string cipherText;
};



  Re: Lost part 2!!!  newProgrammer19 at 09:43 on Wednesday, December 13, 2006
 

please help asap, it is urgent!!!

  Re: Lost part 2!!!  newProgrammer19 at 04:32 on Thursday, December 14, 2006
 

oh gosh please please help...

This 23 message thread spans 2 pages:  < <   1  [2] > >  







CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
//








Recent Forum Threads
•  Re: Problem with concatenation
•  how to genrates the crystal report by sending a id at runtime
•  help me
•  pls help me with this..
•  Re: Security - Code verify
•  Job @ EarlySail
•  Job @ EarlySail (perl)
•  IPC problem
•  Re: import contacts of msn/yahoo


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2007