I was given and assignment to develop a cellphone simulation, part of the requirements includes me using a queue to store the phone numbers that come from a txt file to simulate getting called. I have reviewed over and over again and including #include but the error message telling me “Queue” undeclared still shows up. I am using Bloodsehd Dev-C++, and I have included a sample I used to test the queue, if it is just the program not having the right information, any help would be appreciated. I have checked other sites most say add a #include or a #include neither seemed to solve the problem.
#include <queue>
#include <deque>
#include <iostream>
#include <fstream>
using namespace std;
class cell
{
public:
cell();
~cell();
void upload( string item );//Insert in order
void printnew();//Print call just recieved
void printlater();//Print calls for later
int Front(); //returns front element
int Rear(); //returns rear element
bool Empty();
private:
};
int main()
{
Queue Q;
Q.Enqueue(54);
cout << Q.front();
system("Pause");
return 0;
}
queue is supposed to be lowercase.
You can find info on using the queue here:
http://www.cplusplus.com/reference/queue/queue/queue/