I need to interface C++ code to a C library. I have a std::array
:
std::array<uint8_t, buffer_size> send;
Stuff gets written to send
, and then I need to pass a pointer to this data to a C function. I'm not sure the best way to do that.
Here is my best guess:
write(fd, &send[0], size); // c function