C++ Template classes

This is what I’ve done in class for about 30 min. It was like an exercise for what we have learned the week before. It is mainly a normal stack class in c++, but the interesting thing here is that it doesn’t have a specific type and by creating an object from that class you can tell the type you want to use in the stack. It’s nothing quite new for me, although there was something new by writing methods from that class outside it.

Here’s the code for the program: https://github.com/powerworr/OOP/blob/master/TemplateClass/stack.cc

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s