What are containers/adapters? I have basic knowledge of C++ and its sub-topics like (class/templates/STL).
Can anyone please explain in layman’s language and give me a practical example of the application of containers/adapters?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
<joke>C++ is technical and hard to understand 😀</joke>Containers are data types from STL that can contain data.
Example:
vectoras a dynamic arrayAdapters are data types from STL that adapt a container to provide specific interface.
Example:
stackproviding stack interface on top of the chosen container(side note: both are actually templates not data types, but the definition looks better this way)