Now I'am using Microsoft Visual Studio to compile this program in C++ but I have this error:
1>c:\users\user\documents\visual studio 2008\projects\c++\c++\c++.cpp(97) : error C3861: 'display': identifier not found
And this is the program:
# include<iostream>
using namespace std;
# define SIZE 5
class queue
{
private:
int a[SIZE];
int front;
int rear;
public:
queue();
~queue();
void insert(int i);
int remove();
int isempty();
int isfull();
int display(int n);
};
Your "remove" function doesn't make sense to me. In its current form, calling it twice without any other operations in between has no point as a single call sets every item to 0.
What exactly do you want it to do?
I want the user continue to input and it is full, Display a message, "It's Full!".
and Allow the user to choose an option, to delete an item or not, if the user delete an item, display the item deleted. If the user choose not to delete, display all the items.
That What I want..