How to stop the iterator?

I need to find the missing number and put it in the console.
I compare two iterators and don't know how then to deduce the missing number. How to stop the increment, what would he then do not add to the value. I'm talking about *(pointer + counter) how to freeze the value and print it to the console.

for (int counter = 1; counter < size; counter++) {
 for (int i = 1; i < size; i++) {
 if (*(pointer + counter) != i) {
 cout << "Number of skipped" << *(pointer + counter);
}
}
 }
April 4th 20 at 00:58
1 answer
April 4th 20 at 01:00
Solution
there are in yazye the break keyword,
and read about goto in the use of nested loops.
and for *(pointer + counter) before loop variable to create and to freeze
Pile up - you can even wrap it in a method and return from there to do. - Brandi.Christiansen17 commented on April 4th 20 at 01:03
I goto forbidden to use Siddhartha RAO) - Erick_Dickens commented on April 4th 20 at 01:06
I goto forbidden to use Siddhartha RAO)

@Erick_Dickens, don't listen to him. He told you, I suppose, and learn C++ in 21 days promised? - mikel_Bau commented on April 4th 20 at 01:09
@mikel_Bau, Yes. Now read it, and that it's bad? Then what literature would you recommend - Erick_Dickens commented on April 4th 20 at 01:12
@mikel_Bau, instead of goto, ordered to use for(;;) - Erick_Dickens commented on April 4th 20 at 01:15
Now read it, and that it's bad?

@Erick_Dickens, with such advice it is, let's say, somewhat old-fashioned. Well, about C++ in 21 days -- this is a classic:
ffa11c5561b6ca472680216ac54dbccb.jpg - mikel_Bau commented on April 4th 20 at 01:18
@Erick_Dickens, @mikel_Bau, well crocked question should be read "the C++programming Language Lecture and exercises 6th edition Stephen Prata".

I have it on 50 pages in a day just for 21 days and mastered. (a lie, the first half of the book for the evening, flipped diagonally, in the second half of a week left).

I started in ' 97 with books "IRE the Floor. Object-oriented programming using C++. A detailed discussion of the c++ language (including templates, exception handling and parameterized types) in the context of the paradigm of OOP. Publishing house 1993".

Now I certainly recommend this archaism can't. Well, perhaps only of academic interest. The book was good in that it is not stupid pointless tasks like this. A hike in laboratory was designed and thoroughly reviewed the implementation of abstract data types (linked lists, vectors, stacks, queues, sets, etc.). - keara_Bosco30 commented on April 4th 20 at 01:21

Find more questions by tags C++