#include <iostream> using namespace std; enum steps {nothing, script, firsttrial, secondtrial, recording=6, montage, postsynchron}; void trial_state (steps t[], int hmany, int trial_day); //******************* int main() { const int scene_number=10; steps scene[scene_number]={script, firsttrial, secondtrial}; int trial_day=1; scene[2]=recording; scene[5]=montage; scene[9]=recording; scene[4]=secondtrial; trial_state(scene,scene_number, trial_day); } //********************** void trial_state(steps s[], int hmany, int day) { cout <<day <<".day of montage\n"<<"Trial state: \n"; for(int i=0; i<0; hmany++) { cout << "Scene no"<< i <<","; for (int k=0; k<s[i]; k++) { cout<<"#"; } cout<<endl; } } |
for(int i = 0; i < hmany; ++i)
|
|
|
|
|
|
The other locations are uninitialized and will contain garbage. |
|
|
Isn't the 13th line initializer? |
Is it ok to stop the program with cin.get()? |