Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is a type in C++?

Tags:

c++

types

What all constructs(class,struct,union) classify as types in C++? Can anyone explain the rationale behind calling and qualifying certain C++ constructs as a 'type'.

like image 306
Alok Save Avatar asked Nov 23 '25 09:11

Alok Save


1 Answers

$3.9/1 - "There are two kinds of types: fundamental types and compound types. Types describe objects (1.8), references (8.3.2), or functions (8.3.5). ]"

Fundamental types are char, int, bool and so on.

Compound types are arrays, enums, classes, references, unions etc

like image 64
Chubsdad Avatar answered Nov 25 '25 02:11

Chubsdad