A STRUCT is a C++ data structure that can be used to store together elements of different data types . In C++, a structure is a user-defined data type. The structure creates a data type for grouping items of different data types under a single data type.