Storing data from a loop to a array?
Hi, i'm new to c++ and my question is how do i store data from a loop cycle into a array, then print it?
for(int index= 0; index<10; index++)
x= rand() % 18;
h = master[x];
cout << h << endl;
mix = h;
Do i need to make another loop? if so how do i go about that? also if what i ask is possible, when every time i re-run the compiler will the array above get re-written or erased(hope it does)?
basic as possible please if not please explain thank you