Just move the brackets:
void GetKey(int date, unsigned char key[])
But note that it'll essentially degenerate into a pointer.
Вопрос
void GetKey(int date, unsigned char[] key)
{
}
I am trying to pass unsigned char array t a function but I get an error "expected a ')'" where "key" variable is.
Решение
Just move the brackets:
void GetKey(int date, unsigned char key[])
But note that it'll essentially degenerate into a pointer.
Другие советы
Use template function:
template<size_t N>
void GetKey(int date, unsigned char(&key)[N])
{
}