Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3
your code has many errors. I checked your code on my laptop so the line numbers may be different just check where what I wrote appears, if the line are not the same . if ((front = 0 && rear = size - 1) || rear = size + 1) should be if ((front == 0 && rear == size - 1) || rear == size + 1) + there is a typo in line 55 if((front=0&&rear=size-1)||raer=size+1) rear is spelled raer . + line 74 you should ad a { like this : if (rear >= front){ and close it before else{ + in function del_in_CQ(int CQueue[]) the first return has no value . should be return ret; in general it is a good idea to enclose your IF statement and for loops inside {} . example : int i=0; if(rear>=front) for(i=0;i<front;i++) cout<<"-"; cout<<"<<<"; for(i=front;i<rear;i++) cout<<CQueue[i]<<"<-"; cout<<CQueue[rear]<<">>>"<<endl; else { should be int i=0; if(rear>=front){ for(i=0;i<front;i++){ cout<<"-"; cout<<"<<<"; for(i=front;i<rear;i++) cout<<CQueue[i]<<"<-"; cout<<CQueue[rear]<<">>>"<<endl; } else { after fixing everything if it does not compile remove #include <process.h> and see if it compiles.
3rd Feb 2019, 11:39 AM
Bahhaⵣ
Bahhaⵣ - avatar