Question
C++ Question I need this queue code converted to an STL Queue. The code works as is but needs changed to stl queue. Here are
C++ Question
I need this queue code converted to an STL Queue. The code works as is but needs changed to stl queue.
Here are is the header and mail file:
//Queue.h
#include
//main.cpp
#include"Queue.h" #include
int main(){ //Students queueNodePtr s1,s2,s3,s4,s5; //Student 1 s1 = new queueNode; s1->ID = 123; s1->name="Bob"; s1->major= "CS";
//Student 2 s2 = new queueNode; s2->ID = 456; s2->name="Bill"; s2->major= "Math";
//Student 3 s3 = new queueNode; s3->ID = 789; s3->name="Abe"; s3->major= "Biology";
//Student 4 s4 = new queueNode; s4->ID = 444; s4->name="Joe"; s4->major= "CS";
//Student 5 s5 = new queueNode; s5->ID = 555; s5->name="John"; s5->major= "Nursing"; queue q; q.add(s1); q.add(s2); q.add(s3); q.add(s4); q.add(s5); cout << "ID: Name: Major:"<< endl << endl; q.display(); return 0; system("pause");
}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started