I have a library which expects a array and fills it. I would like to use a std::vector instead of using an array. So instead of
int array[256]; object->ge
Yes:
std::vector array(256); // resize the buffer to 256 ints object->getArray(&array[0]); // pass address of that buffer
Elements in a vector are guaranteed to be contiguous, like an array.
vector