OOPortal
J2EEOnline RationalDB
prev prev
Course navigation
External member functions
Explicit inline functions
The inline specification can be used explicitly with member functions defined at file scope.
This avoids having to clutter the class definition with function bodies.
struct ch_stack {
   .....
   void reset();
   void push(char c);
   .....
};

inline void ch_stack::reset()
{
   top = EMPTY;
}

inline void ch_stack::push(char c)
{
   assert(top != FULL);
   top++;
   s[top] = c;
}
Course navigation