subscript requires array or pointer type??

I have this but there is the c2109 error: subscript requires array or pointer type
on the '[(' part of the code and i cant figure out why.

This is where the error is, on the parentheses part of '[('

1
2
3
4
5
6
7
8
int i= 0;
int lineLength= strlen(encrypted); //length of line being decoded
	
for (int a= 0; a < lineLength; a++)
{
	encrypted[a] = alpha[(a+ shift) % 26];
}
Last edited on
It means that alpha is not an array or pointer
Topic archived. No new replies allowed.