Hi Can anyone help me with my enqueue and dequeue, I am supposed to read from a file and insert into a listlist to do an enqueue and dequeue
The text file sample goes like this,
I cant use template as i wasnt taught yet...
M Mevin
F Mary
etc...
It is a FIFO priority queue so if encounter a lady it will be the first of the link list and if a male at the last of link list
I am stuck at the enqueue and dequeue part and i dont know what to do. Below are my code.
And can anyone teach me how to implement this function, friend ostream& operator<< (ostream&, Queue&);
And also is my assignment overloading correct??
Thanks all for the help..am really dying...and also pardon for my english..
#include <iostream>
#include <fstream>
using namespace std;
const int MAX = 20;
class Person
{
friend ostream& operator<< (ostream&, Person&);
public:
Person(); // do nothing
Person(char [], char);
Person(const Person&);