'Can a vector::iterator also function as a vector

So I am trying to load a binary file into a Vector, so I can use it like a Buffer.

ifstream binaryFile;
vector<unsigned char> fileBuffer(istreambuf_iterator<char>(binaryFile), {});
vector<unsigned char>::iterator fileIter = fileBuffer.begin();

Now my question is, if I use the fileIter variable, can I access all the elements in the fileBuffer vector ?
I want to know, because I need to edit the contents of the fileBuffer only at certain Positions, that is why I am working with iterators in the first place.

In a nutshell, I want to know if the content of the vector fileBuffer will change, according to edits made to the fileIter with code like *(fileIter + 2) = 'a';

I have researched this Topic but I have not yet found an answer.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source