You can also use std::vector::data() if using MSVC 2010 or later, or clang/gcc with -std=c++11. This returns the address of the first element in the internal array. For example:

...