I've loaded a text file into a buffer, and wanting to use good C++ style, used a vector<char>
. I then wanted to pass an iterator from said vector to a char*
function argument - I assumed that under the hood, a vector iterator just resolves to a pointer to the member type. However, I get the following error:
no known conversion for argument 2 from ‘const __gnu_cxx::__normal_iterator<char*, std::vector<char> >’ to ‘char*’
Is a vector iterator not just a pointer? Would just using a pointer be more efficient in that case?