Hi,
I am making a program a Teller class for queue and it is class which has a Teller, customer and a counter .
--------------------------------------------------------------------------Code:
class Teller
{
public:
Teller();//constructor/
~Teller();//destructor/
int enqueue();//to add customer to queue/
int dequeue();//to remove customer from the queue/
private;
int *front; //front pointer for the queue/
int *rear; //rear pointer for the queue/
Teller *nextptr; //next pointer/
int node;//node variable for customer/
int newNode;// node for the new customer/
};
main()
Teller teller; //object for class Teller/
{
teller.enqueue()
newNode->setnext(Null);
rear->setnext(newNode);
rear=newNode;
}
I have just created one object "teller" for this class and this object is basically a counter. I have used the method "enqueue()" to add customers to this counter(teller).
I wanted to know that for the object "teller" ,if we use method "enqueue()" to add customers to the queue, can we define its return type if we pass an argument of "int node" to it?
Thanks