C++ Containers Question: Download C++ Containers PDF

Can you please explain the difference between homogeneous and a heterogeneous container?

Tweet Share WhatsApp

Answer:

A container is an object holding instances of another object. A container that contains or holds objects of a single type is said to be homogenous. On the other hand, A container that contains objects (derived from a common base class) of a variety of types is termed heterogeneous.

Download C++ Containers PDF Read All 19 C++ Containers Questions
Previous QuestionNext Question
Do you know what is a container class? What are the types of container classes?Tell me when should we use container classes instead of arrays?