Develop a program that performs simple cryptography. The program will allow
the user to enter a string and a cryptographic key, and the program will then encrypt the string using the key and send the output of the encryption to a f\ile.
This is what I have so far
#include %26lt;iostream%26gt;
#include%26lt;string%26gt;
using namespace std;
class Message
{
private:
string content;
int location;
public:
Message() : content(""), location(0) {};
Message(string s) : content(s), location(0) {};
string print() const;
void addToContent(string s);
};
string Message::print() const
{
return(content);
}
void Message::addToContent(string s)
{
content.append(s);
}
int main ()
{
string input;
cout %26lt;%26lt; "enter some text: ";
getline(cin, input);
Message rect(input);
cout %26lt;%26lt; "\nText was: " %26lt;%26lt; rect.print() %26lt;%26lt; endl;
return 0;
}
I am working on an C++ encryption program and I can use some help?
So what, exactly, is your question?
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment