Why there is a mistake

I just wrote a program, the compiler says I have a mistake:
error C2109: subscript requires array or pointer type
The location of the error code is:
fout<<(char)((+(int)b[i])%256+(int)mima[mimawhere%(sizeof(mima)/sizeof(mima[0]))]),mimawhere++;
Please help me to change, thanks! Sorry, my English is very poor.
(mima is password's pronunciation in Chinese)
That code is very, very messy. Can't you simplify it?

You can spread things out on multiple lines you know. There's no reason to cram so much onto 1 line. It just makes the code hard to read and understand.


Anyway it compiles fine here once I fill in the variables. Make sure b and mima are both arrays. I suspect 'b' is not an array in your code.
Oh, I'm careless. I found that I didn't have my mima defined as an array. But I still want to thank you for your warning.
Topic archived. No new replies allowed.