Skip to main content

Using the STL in Text Adventure

  • Chapter
  • First Online:
Learn C++ for Game Development
  • 3762 Accesses

Abstract

So far you have seen how a game can be built using classes, member variables, and C-style arrays. In this chapter you will see how you can use some of the STL classes covered in this part of the book to simplify the code you have been creating. This chapter uses polymorphism to store pointers to base classes in our STL containers. If you need a recap on polymorphism and how it is used, you should read over Chapter 11.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 59.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 79.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Bruce Sutherland

About this chapter

Cite this chapter

Sutherland, B. (2014). Using the STL in Text Adventure. In: Learn C++ for Game Development. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-6458-3_19

Download citation

Publish with us

Policies and ethics