---
title: "Discussion on \"[C++]Modelling an Array of multiple types using Templates\" | Hashnode"
description: "Discussion on \"[C++]Modelling an Array of multiple types using Templates\". In my previous articles I talked about what templates in C++ are and it's types with examples. Here I'm going to show you a little power of templates, I'm going to model my own array which can take hold multiple types. First I'm going to model an arr..."
url: "https://hashnode.com/posts/modelling-an-array-of-multiple-types-using-templates/606b953bb17dc439b747deec"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [\[C++\]Modelling an Array of multiple types using Templates](https://codepadawan.hashnode.dev/modelling-an-array-of-multiple-types-using-templates?utm_source=hashnode&utm_medium=feed)

In my previous articles I talked about what templates in C++ are and it's types with examples. Here I'm going to show you a little power of templates, I'm going to model my own array which can take hold multiple types. First I'm going to model an arr...

Apr 5, 2021 · 4 min read · codepadawan.hashnode.dev  
Read the article

-   [#cpp](https://hashnode.com/tag/cpp)
-   [#beginners](https://hashnode.com/tag/beginners)
-   [#beginners-learningtocode-100daysofcode](https://hashnode.com/tag/beginners-learningtocode-100daysofcode)
-   [#100daysofcode](https://hashnode.com/tag/100daysofcode)

## Written by

[Chisom Hermes Chigoziri](https://hashnode.com/@Padawan)

@Padawan · Lagos, Nigeria

  
[View profile](https://hashnode.com/@Padawan)

Software Developer

## Responses 1

Markdown supported · ⌘↵ to post

[Yosef Meller](https://hashnode.com/@yosefm)

[Apr 30, 2021](https://hashnode.com/posts/modelling-an-array-of-multiple-types-using-templates/606b953bb17dc439b747deec/comment/608c10bbdc886b4318004047)

It should be noted that if one's not doing it for the learning or fun, in production code it's best to use `std::array<>` and not reinvent the wheel.

[Chisom Hermes Chigoziri](https://hashnode.com/@Padawan)

[Apr 30, 2021](https://hashnode.com/posts/modelling-an-array-of-multiple-types-using-templates/606b953bb17dc439b747deec/comment/608c10bbdc886b4318004047#reply-608c1283dc886b4318004066)

yup, i did it to see if i can do it, i'm a beginner in C++, it was just an experiment
