I do not have much experience in c ++ and I have the following question: I have an array / vector of N elements, and I have to enter it into a while condition to check if any of its elements equals a constant number k, but the idea is that every time you return to the while, the array looks for the number k in all the elements repeatedly (that is from 0 to N-1 every time it passes through the while). In short, I want the while always to ask if the number k is in the whole arrangement. That's why I can not use the for cycle (or so I think). Of course, the arrangement will change the values within the cycle so that the while ends sometime. In short what I expose is:
while(arreglo(i)==k){} //con i=0,N-1