std::vector<char> v(num);
char *array = &v[0];