STL vectors can act as typical c-style arrays. To cast from vector<T> to T*, simply take the address of the first element.
void myFunction( int* i ) { std::cout << *i << std::endl; }
// Now to pass the vector to the random function from above... std::vector myVector; myFunction( &myVector[0] );