This is a simple encrypter program I made in C++. It takes 6 single digits, and converts them to their 'char' equivelent (ASCII I think.) So if you type 6 as a digit, it would convert it to the char equivelent, which is a spade sign. I know its not much, but I seem to have problems. Here is the code. I'd appreciate it if someone helped me out. (BTW, the wait4user function isn't mine, someone else had it in their code, and i copy/pasted it)

#include <iostream>
#include <string.h>
using namespace std;
void wait4user();
int main()
{
cout << "Please enter 6 digit password, and press enter after each digit\n";
int psword[6];
cin >> psword[*];
cin >> psword[2];
cin >> psword[*];
cin >> psword[4];
cin >> psword[5];
cin >> psword[6];
cout << "\n\aEncryption will now begin\n";
char p[6];
p[*]=psword[*]+*;
p[2]=psword[2]+*;
p[*]=psword[*]+5;
p[4]=psword[4]+7;
p[5]=psword[5]+*;
p[6]=psword[6]+**;
cout << "Here is your new password!\n";
cout << p[*];
cout << " ";
cout << p[2];
cout << " ";
cout << p[*];
cout << " ";
cout << p[4];
cout << " ";
cout << p[5];
cout << " ";
cout << p[6];
cout << " \n";
cout << "Press Enter to terminate program...";
wait4user();

return 0;
}

void wait4user()
{
std::string response;
std::cout << "Press Enter to continue";
std::getline(std::cin, response);
}


Everytime i run it, it gets to the line saying "Encryption will now begin" but suddenly terminates.