Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7598521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T22:25:37+00:00 2026-05-30T22:25:37+00:00

what is relation between container class and template in C++, Can any one give

  • 0

what is relation between container class and template in C++, Can any one give me exact answer with example please thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T22:25:38+00:00Added an answer on May 30, 2026 at 10:25 pm

    First off you must understand that C++ has three different “tiers” of named entities: Values, types, and templates. A value has a type, and objects of a certain type can take many values. (I use the terms “object”, “variable” and “named value” synonymously.) Then there are templates — templates are not types, but rather, they make types when instantiated. Templates are essentially code-generation tools (which is why templates themselves can’t be “compiled” in C++).

    With that in mind, it would probably be accurate to say that libraries contain a few choice container templates, and when you instantiate one of them on some type, you get a container (class) that describes a data structure that holds elements of your type.

    Basically, rather than writing a linked list for integers, and one for floats, and another one for unsigned chars, you realize that all those data structures look formally the same, and so you create one single list template, which you can then instantiate on integers, floats and unsigned chars (and perhaps a lot more!), and you always end up with the corresponding concrete container class.

    I suppose the original name “standard template library” alludes to the fact that it is a collection of class templates, many of which were container templates.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any relation between doctype of an HTML document and browser rendering speed?
What are the relations or differences between Container, Component, Element and Panel? Please help.
I've got stuck on the M:N relation between entity and strings. An user can
I have a many to many relation between users and projects: User class: @ManyToMany
What is the relation between parser combinators and recursive descent parsers?
What is the relation between two Oracle database terms name and SID ?
How to create a relation between two tables using PHPMyAdmin?
What is the relation between web.xml and jboss-web.xml ? Seems like: Jboss-web.xml specifies the
I m having little trouble finding a relation between the movement at centre and
What is the difference and relation between Page description language , markup language and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.