0
What is the meaning or use of int++in an while loop?
figure out
4 ответов
+ 3
int++ ?
I have never seen that.
You can't increment a datatype!
First declare a variable then increment that variable.
Like:
int x;
x++;
+ 1
increment..in loop output
0
You would usually increment an int in a loop to count how many times it repeats.
Whether it's to repeat a specific number of times (should probably use a FOR() loop for that, really) or simply using cout << i++ in debugging to keep track of exactly how many times that loop repeats.
- 1
It would increment an int