Purchase Solution

C++ - Stacks and Stl

Not what you're looking for?

Ask Custom Question

Implement a Stack class yourself - NOT using the STL. Your stacks should contain elements whose type is specified by the class user as a template parameter. Create a constructor which accepts a single argument giving the maximum size to which the stack can grow. Include methods named pop and push with the standard functionality, as well as a method named "empty" which determines whether the invoking stack object is empty. Include operator overloads for +=, =, and -- with the appropriate functionality. Test your Stack class by modifying the "test.cpp" code (provided) to use your Stack class template instead of the STL stack template.

Deliverables:
The 2 files Stack.h and Stack.cpp.

See the attached files.

Attachments
Purchase this Solution

Solution Summary

The solution discusses C++ stacks and stl.

Purchase this Solution


Free BrainMass Quizzes
Javscript Basics

Quiz on basics of javascript programming language.

Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.

Basic Networking Questions

This quiz consists of some basic networking questions.

C++ Operators

This quiz tests a student's knowledge about C++ operators.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.