cout<<"Enter a big number: ";
cout<<"Enter another one(smaller): ";
Thank you for the code snippet but it doesn't seem to be the same case since what you are implementing is not a circular queue. By definition, in a circular queue, the front and tail indexes are set to zero when they reach the max_size , which is expressed here by a modulo. May be I don't explain my problem correctly but your code does simply calculate the difference between two numbers and shows the result, doesn' it??