Queue using array

error in output. Implement queue using array.
#include
using namespace std;
//f=front,r=rear,cs=current size,ms=max size,
class Queue
{
int *arr;
int f,r,cs,ms;
public:
Queue(int ds)
{
arr=new int [ds];
cs=0;
ms=ds;
f=0;
r=ms-1;
}
bool full()
{
return cs=ms;
}
bool empty()
{
return cs==0;
}
void push(int data)
{
if(!full())
{
r=(r+1)%ms;
arr[r]=data;
cs++;
}
}
void pop()
{
if(!empty())
{
f=(f+1)%ms;
cs–;
}
}
int front()
{
return arr[f];
}
~Queue()
{
if(arr!=NULL)
{
delete [] arr;
arr=NULL;
}
}
};
int main()
{
Queue q(5);
for(int i=0;i<=6;i++)
{
q.push(i);
}
q.pop();
q.pop();
q.push(7);
while(!q.empty())
{
cout<<q.front()<<" ";
q.pop();
}
return 0;
}

The file path is not being copied.

hello @juyal.sid

please share ur code using cb ide.

go to -> https://ide.codingblocks.com/

paste ur code in the editor
go to file option present on top
click on it , u will see save option
click on save , a link will be generated in ur search bar.
share that link with me

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.