Search code examples
c++typesuser-defined-types

Built-In Type Vs. User Defined Type C++


Built-in Type Vs. User Defined Type (C++)

So I have come across both of these two terms in course notes, and the use of them seems identical, however I have a feeling they each refer to a distinct type. "A built-in type is a type that can be built from a fundamental type, using qualifiers and operators." From my Course notes.

Would it be fair to say then that User Defined Types refer only to Classes & Structs whereas A built in type refers to pointers & Arrays?


Solution

  • There is no strict definition of a user-defined type. However the Standard distinguishes in its descriptions fundamental types and user-defined types. If to follow the logic of the C++ Standard then any compound type except pointer types and references to fundamental types can be considered as a user-defined type.