Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //example 1, do sth to all elements in vector using c-style API
- void doSomething(const int *pInts, size_t numlnts);
- vector<int> v;
- if (!v.empty()) {
- doSomething(&v[0], v.size());
- }
- //example 2, init vector with c-style API
- size_t fillArray(double *pArray, size_t arraySize);
- vector<double> vd(maxNumDoubles);
- vd.resize(fillArray(&vd[0], vd.size()));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement