Assigning values to an array

I am trying to assign these 9 variables in the array a value equal to what I type into the serial port one at a time.
However, I am getting the error message "lvalue required as left operand of assignment" for the bottom line of code.

int eventTimes [9] = {shour, smin, ssec, bhour, bmin, bsec, rhour, rmin, rsec};
for (int in = 0 ; in < 9 ; in++){
  
  while (!Serial.available()) {
    //wait for a the user to enter a value
    ;
    }
    (int) eventTimes[in] = Serial.parseInt();}

Is it just a limitation with the language, or am I making a mistake?
This is my first time using for-loops and arrays and any advice would be helpful.

the (int) casting of the variable should be removed, eventTimes[in] = Serial.parseInt();}

This

int eventTimes [9] = {shour, smin, ssec, bhour, bmin, bsec, rhour, rmin, rsec};

probably does not do what you seem to think that it does. One way to accomplish this would be with a union, but if you understood a union you would not have needed to post here.

Because you only posted a snippet of your code, I have given you a snippet of the answer.

Snippets R Us!