Computer Science, asked by jolisebi71836, 1 year ago

What is iteration through loops in C++

Answers

Answered by HarshGoswami
0

Hmmmmm question ...

But sorry dont know

Answered by DevanshiAgnihotri
1

The function:

1

2

3

4

5

6

7

8

9

10

11

12

13

void printVector(const vector <int> *inVector, const string inName)

{

vector<int>::iterator it;

cout << inName << " is size " << inVector->size() << " with a " << inVector->capacity() << " element capacity:\n";

for (it = inVector->begin(); it != inVector->end(); it++)

{

 cout << *it << " ";

}

cout << "\n\n";

}

The call:

printVector(&vecOne, "vecOne");

The error:

Error 1 error C2679: binary '=' : no operator found which takes a right-hand operand of type  

'std::_Vector_const_iterator<_Ty,_Alloc>' (or there is no acceptable conversion) 109


Similar questions