1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205
|
#include <iostream>
using namespace std;
int main(){
char a;
char b;
char c;
char d;
char e;
char f;
char g;
char h;
char i;
char j;
char k;
char l;
char m;
char n;
char o;
char p;
char q;
char r;
char s;
char t;
char u;
char v;
char w;
char x;
char y;
char z;
bool PlayAgain;
cout << "ENTER A CHARACTER TO USE AS EACH LETTER OF THE ALPHABET; HIT ENTER TWICE AFTER ENTERING A LETTER" <<endl;
system("PAUSE");
cin >> a;
system("PAUSE");
cin >> b;
system("PAUSE");
cin >> c;
system("PAUSE");
cin >> d;
system("PAUSE");
cin >> e;
system("PAUSE");
cin >> f;
system("PAUSE");
cin >> g;
system("PAUSE");
cin >> h;
system("PAUSE");
cin >> i;
system("PAUSE");
cin >> j;
system("PAUSE");
cin >> k;
system("PAUSE");
cin >> l;
system("PAUSE");
cin >> m;
system("PAUSE");
cin >> n;
system("PAUSE");
cin >> o;
system("PAUSE");
cin >> p;
system("PAUSE");
cin >> q;
system("PAUSE");
cin >> r;
system("PAUSE");
cin >> s;
system("PAUSE");
cin >> t;
system("PAUSE");
cin >> u;
system("PAUSE");
cin >> v;
system("PAUSE");
cin >> w;
system("PAUSE");
cin >> x;
system("PAUSE");
cin >> y;
system("PAUSE");
cin >> z;
cout << "OTHER PLAYER WILL NOW ATTEMPT TO DECODE THE SCRAMBLED ALPHABET" << endl;
system("PAUSE");
system("cls");
if (a=a,
b=b,
c=c,
d=d,
e=e,
f=f,
g=g,
h=h,
i=i,
j=j,
k=k,
l=l,
m=m,
n=n,
o=o,
p=p,
q=q,
r=r,
s=s,
t=t,
u=u,
v=v,
w=w,
x=x,
y=y,
z=z){
cout << a;
cout << e;
cout << i;
cout << o;
cout << u;
cout << c;
cout << b;
cout << v;
cout << x;
cout << p;
cout << l;
cout << k;
cout << w;
cout << r;
cout << g;
cout << h;
cout << n;
cout << m;
cout << q;
cout << s;
cout << d;
cout << f;
cout << j;
cout << t;
cout << y;
cout << z << endl;
system("PAUSE");}
while (PlayAgain==true){ //error #3 occurs here, 'PlayAgain' used without being initialized
cout << "REARRANGE THE ALPHABET, SO IT IS STILL IN IT'S CODED FORM BUT IN ITS CORRECT ORDER; NO SPACES OR PUNCTUATION" << endl;
system("PAUSE");
cin >> a;
system("PAUSE");
cin >> b;
system("PAUSE");
cin >> c;
system("PAUSE");
cin >> d;
system("PAUSE");
cin >> e;
system("PAUSE");
cin >> f;
system("PAUSE");
cin >> g;
system("PAUSE");
cin >> h;
system("PAUSE");
cin >> i;
system("PAUSE");
cin >> j;
system("PAUSE");
cin >> k;
system("PAUSE");
cin >> l;
system("PAUSE");
cin >> m;
system("PAUSE");
cin >> n;
system("PAUSE");
cin >> o;
system("PAUSE");
cin >> p;
system("PAUSE");
cin >> q;
system("PAUSE");
cin >> r;
system("PAUSE");
cin >> s;
system("PAUSE");
cin >> t;
system("PAUSE");
cin >> u;
system("PAUSE");
cin >> v;
system("PAUSE");
cin >> w;
system("PAUSE");
cin >> x;
system("PAUSE");
cin >> y;
system("PAUSE");
cin >> z;
system("PAUSE");
cout << "CALCULATING..." << endl;}
if (a=a,b=b,c=c,d=d,e=e,f=f,g=g,h=h,i=i,j=j,k=k,l=l,m=m,n=n,o=o,p=p,q=q,r=r,s=s,t=t,u=u,v=v,w=w,x=x,y=y,z=z){
cout << "CONGRADULATIONS!!" << endl; PlayAgain=false;}
else {cout << "YOU FAILED; RESTARTING..." << endl;
PlayAgain=true;
system("PAUSE");}
}//Run-Time Check Failure #0 -
//The value of ESP was not properly saved across a function call.
//This is usually a result of calling a function declared with one calling
//convention with a function pointer declared with a different calling convention.
|