I am learning encryption in C++. I read the tutoril on OR-Encryption. I tried to get input from the user and encrypt that phrase, but the compiler said that was forbidden. Here is what I had:
#include <iostream.h>
#include <stdlib.h>
int main()
{
char string[11];
cout << "Enter the phrase to be encrypted: ";
cin >> string;
char key[11] = "ABCDEFGHIJ";
for (int x = 0; x < 10; x++)
{
string[x] = string[x]^key[x];
cout << string[x];
}
cout << endl;
system("PAUSE");
return 0;
}