This is my program so far...
Code:
int main(int argc, char* argv[])
{
int code;
int test;
int n;
test = 0;
int maintest;
maintest = 0;
float word;
char yn;
n = 0;
while (maintest == 0)
{
fstream file("decode.txt", ios::out);
char ch, password[51];
cout << "\nEnter a password (max 8 letters): ";
cin >> password;
file << password;
file.close();
file.open("decode.txt", ios::in);
while (test != 1)
{
cout << "\nHit 1 to Encode, Hit 2 to Decode: ";
cin >> code;
if (code == 1 || code == 2)
{
test = test++;
}
}
if (code == 1)
{
file.get(ch);
while (!file.fail())
{
cout << hex << ch;
n = n++;
file.get(ch);
}
}
if (code == 2);
{
}
cout << "\nFinish? (Y or N)";
cin >> yn;
switch (yn)
{
case 'y': maintest = 1;
case 'n': break;
default : cout << "\nError";
}
}
return 0;
}

