I'm designing a multilevel queue process simulator in C++ but I've got a problem when trying to implement several queues (my queues are vectors).So, "multilevel" is a 4 elements array (not vector). Inside each of those elements there is a vector (type t_PCB).
vector<vector<t_PCB>> multilevel[4];
My question is: How can i insert an element at the end of one these 4 t_PCB
vectors? Thank you in advance.
I've tried the code line below but it doesn't work (error: not matching member function for call 'push_back')
multilevel[0].push_back(p); //where "p" is a t_PCB object
The line from above can not be used when talking about "multilevel" because this array only accepts arguments type: vector < t_PCB >
So, as I ask at the beginning: how can I push an object type "t_PCB" inside "multilevel"?