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])
{
}
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top