First, consider writing a constructor, like
struct PCB{
PCB(el_t id_,string state_){
id=id_;
state=state_;
}
};
Second, consider making the state an enum - that would be much better IMO, but it depends on you.
Finally, an array of structs is nothing special, just use operator.() , like:
int main(){
PCB arr[50];
for(int i=0;i<49;i++)
arr[i].id=1;
}
Finally, are you sure you can assign an int to type el_t ?