Thread: Class named Stack

  1. #1
    Registered User
    Join Date
    May 2002
    Posts
    11

    Class named Stack

    Create a class named as Stack, which should have the following member functions:
    · Push() method, single argument method, to add a character on top of a stack
    · Pop() method, to remove and return a character from top of stack
    · IsEmpty() method, to test whether the stack is empty or not
    · IsFull() method, to test whether the stack is full or not
    · Constructor functions, depending upon the need.
    The class should have the following data members:
    · Integer type variable, which indicates the position of top of stack, when empty it will be –1.
    · Character array to hold the character added to the stack.

    Using this class, write a main() which should accept a string form the user and display it in the reverse order.

  2. #2
    Registered User
    Join Date
    May 2002
    Posts
    63
    What was the point of the little outburst of a class called Stack?
    tudehopet uses Borland Compiler 5.5
    and Visual C++ 6.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 08:18 PM
  2. Need Help with Stack
    By trongsi in forum C++ Programming
    Replies: 9
    Last Post: 05-23-2006, 04:14 PM
  3. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  4. stack implementation problem-help needed
    By sanju in forum C Programming
    Replies: 1
    Last Post: 12-10-2002, 07:29 AM
  5. structure vs class
    By sana in forum C++ Programming
    Replies: 13
    Last Post: 12-02-2002, 07:18 AM