Question: Write a program in C++ that reads double values from text file called numbersToQueue.txt and enqueues the values in to queue. Finally prints the content
Write a program in C++ that reads double values from text file called numbersToQueue.txt and enqueues the values in to queue. Finally prints the content of queue on the screen.
(hint: implement double Queue first)
template
clas Queue{
private:
Node* front;
Node* rear;
public:
bool isEmpty()const
{
}
bool isFull()const
{
}
ElemType dequeue()
{
}
void enqueue(const ElemType &e)
{
}
int main(){
char fname[100]="numbersToQueue.txt";
Queue
createQueue(&q);
readFromFile (&q,fname);
printQueue(&q);
return 0;
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
