How do I make this work:
void foo(uint8_t a[]) { ... } foo({0x01, 0x02, 0x03});
It gives me an error:
error: cannot conver
You cannot. Just construct
uint8_t a[] = {0x01, 0x02, 0x03};
and call foo(a).
foo(a)
Or just use std::array, that is probably better.
std::array