My question is about composite types. I can't seem to find anywhere that explains what compound types are in C++.
Are they different from composite types?
In computer science, a composite data type or compound data type is any data type which can be constructed in a program using the programming language's primitive data types and other composite types.
A composite or compound data type is built by combining primitive data types. An example of a composite or compound data type is a record or a class. A data structure is a collection of data that is organised to allow efficient processing.
What is the List Compound Data Type? Lists are exactly what we might be expecting: the list compound data type contains an ordered list of objects. The list — unlike the set — may contain duplicates and is in a specific order. Unlike the tuple , the elements of the list itself don't in total comprise a record.
From the book C++ Primer, 5th edition:
A compound type is a type that is defined in terms of another type. C++ has several compound types, two of which, references and pointers...
I think it means compound types are types like references and pointers. Do correct me if I'm wrong.
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