LCR_cipher& LCR_cipher::operator++ ()
{
int Y;
int X;
char c = ' ';
for (int i = 0; i < lengthcontext; i++)
{
X = encodeLetter(context[i]);
if (X != -1)
{
Y = (a*X + c) % 29;
context[i] = encodeNumber(Y); //这里给出的提示是Exception thrown: write access violation.
this->context was 0x21112A2.
If there is a handler for this exception, the program may be safely continued.
}
}
return *this;
}
encodeNumber(Y);
看你这个函数的代码是否都正确哪。。。