i'm attempting this:
where the index array is a private member of KeyPositioner and k is a key, obviously.Code:void KeyPositioner::set_key_indices(Key k){ for(int i = 0; i < 8; i++){ index[i] = k[i]; } }
I think i need to overload "[]" to accomplish what I'm attempting here, though another solution/work-around will do the job as well.
Anyway, it's giving me the error:
Code:error: pointer to function used in arithmetic error: no match for operator[] in k[i]