Вопрос

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