i need helping constructing an array of structs, this is my part of my header file which contains the following struct
struct PCB
{
el_t id; // contains the priority of the process
string state; // current state of the process (e.g running)
PCB *next;// link to the next process
};
i need help creating an array of 50 structs PCB and initialize all state to READY, and initialize all el_t id from 1 to 50 for example
id[0] = 1;
id[1]=2;
.
.
id[49]=50;
i never created an array of structs, so any help is appreciated.