ok guys , my self found an answer . I think yes we can use the variable
s
but we need the size of the array later for isFull() and isEmpty() functions . So , we need to store the value , the size of the array in a variable .. gotcha .. BINGO ..!!
"Why cant we use the variable s
rather than using maxSize
"
Maybe because "s" is local to "Queue::Queue( )", and beyond that, "s" will not exist, so you have to store the value of "s" in "maxSize" to extend the scope of "s"'s value.