R
Roger
Is it possible to increment the array index in a for loop? I want to
make a program where the user inputs numbers individually and then
store them into an array. For each integer input, the array index will
increment to store the number.
Is this possible? I'm thinking of ArrayList in Java where the array
can dynamically expand, does C++ have anything like that?
make the arrray
for loop
print a question asking user for input
user inputs (if user inputs 50, then the loop exits)
inputted number stored into the array
array index is incremented
end loop
make a program where the user inputs numbers individually and then
store them into an array. For each integer input, the array index will
increment to store the number.
Is this possible? I'm thinking of ArrayList in Java where the array
can dynamically expand, does C++ have anything like that?
make the arrray
for loop
print a question asking user for input
user inputs (if user inputs 50, then the loop exits)
inputted number stored into the array
array index is incremented
end loop