跳转至

2009#

C++ Data Types

Every name and every expression has a type that determines the operations that may be performed on it.

Types built out of the built-in types using C++’s abstraction mechanisms are called user-defined types. They are referred to as structures, classes and enumerations.

C Data Types

A C program, whatever its size, consists of functions and variables. A function contains statements that specify the computing operations to be done, and variables store values used during the computation.

在 C 程序里,函数(function)就是指令,变量(variable)就是数据。数据类型定义了变量的存储和访问属性,约束了其大小边界(size/boundary)、取值范围(value range)、解释呈现(interpretation/representation)和可操作集(operation set)。

Data Type

The type defines the operations(access or manipulate) that can be done on the data, the meaning of the data, and the way values of that type can be stored.