Hi,
I have a program as:
I have some questions about this small program, when do we actually need to have a return type as pointer with the method remove?Code:Event* remove() { if(size>0) { Event* e=nodes[0]; for (int j=0; j<size-2;j++) nodes[j]=nodes[j+1]; size=size-1; rear=rear-1; if( size==0) rear=-1; return e; }
If we have a method as :
Event* e=nodes[0];
Does this mean that we are passing an element or data from the 1st location(0) of the node to the pointer Event?
Regards,