help with queue declaration

in my main i have this
PCB1 pcb;

in another header file I have a class PCB1.

in another header file, I have a class ready_queue and I did this : queue <pcb> ready_queue; but I'm getting error that says pcb1 was not declared in this scope.
Last edited on
another question:

I need to use a array to do this. So like if user enters the number 2. Then, it will print p1 p2. If user enters the number 3. Then, it will print p1 p2 p3.
Last edited on
in another header file, I have a class ready_queue and I did this : queue <pcb> ready_queue; but I'm getting error that says pcb1 was not declared in this scope.

When you create an instance of a template object, the entity between the angle brackets needs to be the type, e.g. PCB1.

another question:

I need to use a array to do this. So like if user enters the number 2. Then, it will print p1 p2. If user enters the number 3. Then, it will print p1 p2 p3.

What's the question?

Last edited on
Topic archived. No new replies allowed.