Need help understanding or getting a function to work

This is just part of my current code, but I am struggling I guess typing correctly inside the for loop on the main function. Which I want it to go through the map function and the encrypt functions, but I am doing something wrong. I am very new to C++.



void map(char *encrypt, char letter)
{
char letter, letter2;
int number, number2;
if (encrypt >= "a" && encrypt <= "z")
{
number = letter - 'a';
}
if (encrypt >= "A" && encrypt <= "Z")
{
number = letter - 'A';
}
}


int main(void)
{

string decrypt;
char encryptionkey;
int size , choice, choice2;
cout << "Press 1 to put in encryption key, press 3 to exit";
while ((cin >> choice) && choice == 1 || choice == 2)
{
cin >> encryptionkey;

string encrypt;
string password1;
cout << "Please Enter 1 for Encrypt or 2 for decrypt.";
cin >> choice2;
int value, value2;
switch (choice)
{
case 1:

cout << "Please enter password.";
cin >> password1;
char letter, letter2;
for (int i = 0; i < password1.length(); i++)
{

encrypt(password1[i], map(encrypt. letter), i);

}
cout << "encrypted data is " << encryption << endl;
break;
Topic archived. No new replies allowed.