Thread: about c program

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Nov 2011
    Posts
    96

    about c program

    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
    Last edited by student111; 11-27-2013 at 11:25 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 12-11-2012, 12:25 AM
  2. Replies: 1
    Last Post: 03-03-2009, 04:47 PM
  3. Replies: 5
    Last Post: 08-16-2007, 11:43 PM
  4. Replies: 18
    Last Post: 11-13-2006, 01:11 PM
  5. How To Make The Program Installed In Program Files Folder?
    By javacvb in forum Windows Programming
    Replies: 4
    Last Post: 11-05-2003, 05:33 PM