C++.Coding.Standards.1918.Rules.Guidelines [Electronic resources]

Herb Sutter, Andrei Alexandrescu

نسخه متنی -صفحه : 521/ 402
نمايش فراداده

Summary

vector isn't lost in translation:

vector and

string::c_str are your gateway to communicate with non-C++ APIs. But don't assume iterators are pointers; to get the address of the element referred to by a

vector<T>::iterator iter , use

&*iter .