any idea how we can cast from std::vector types.
e.g.. i am using the win32 API RegQueryValueEx().
the out buffer it takes should be LPBYTE.
i used the code as shown,
TCHAR * buf = new TCHAR[2];
RegQueryValueEx(................ (BYTE*)buf));
now i want to use a vector instead of TCHAR*.. so what i did is,
std::vector<TCHARbuf(2);
now i want to use this in the RegQueryValueEx() API, how do i cast it
to LPBYTE... i tried using const_iterator.... the cast doesn't produce
warning or error, but the results are not as desired.