Newb question: Modifying Arrays
I have somewhat of a puzzle. Knowing C++ for a grand total of 3 days, I'm trying to make a console program that'll calculate the value of prime integers from 1 to 100. Unfortunately, I'm curious as to if you can add a value to an array when a program is running.
For example: loop here has produced a result
Code:
{Loop here}
-Finished result of previous loop-
However, while the program is running, is it possible to move the product of the loop into an array, such as the following?
Code:
-Finished result- *goes into* -Array one-
*print contents of Array 1*
Sorry for my lack of formal code. I'm mostly wondering whether the logic I presented is possible.