What is a container? As I understand it:
An abstract data type is merely a logical description of the way the data will be stored and the operations that will be permitted on that data. For example, a stack is defined as a data type with the operations push, pop, etc. and LIFO access.
A data structure is the actual implementation of this abstract definition, in some computer programming language, for example, a stack in C++ is implemented in the standard library, as std::stack.
Firstly, please correct/enhance my current understanding of the aforementioned distinction.
Secondly, what exactly is a container? I hear this word thrown around quite often. Is it the same as my definition of a data structure?
Also, wikipedia has three separate entries for these terms.
Data structures are similar to containers since they can store one or multiple elements. However, they differ from containers because they don't support operations containers usually support.
In computer science, a container is a class or a data structure whose instances are collections of other objects. In other words, they store objects in an organized way that follows specific access rules. The size of the container depends on the number of objects (elements) it contains.
Definition. The data container is a container holding data for the application. The data consists of objects (rows in the data container) and each object has a series of attributes (columns in the data container). Use. The data container provides data that can be represented in one or more graphics.
Nothing, really. They're just two words for the same term, as we humans love to do. However, afaik, the official CS term is data structure, and the C++ Standard has specific C++ requirements for Container. However, in general, they are equivalent.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With