Wednesday, May 21, 2008

Data Types

C++ categorizes data into different types, and only certain operations can be performed on particular type of data. To put it simple, data type is a set of values together with a set of operations. This data type is divided into three types; simple data type, structured data type, and pointer.

The simple data type is the fundamental data type in C++ because it becomes a building block for the structured data type. There are three category of simple data type, that is:
  • Integral ~ a data type that deals with integers, or numbers without a decimal part.
  • Floating-point ~ a data type that deals with decimal numbers.
  • Enumeration ~ a user-defined data type.

No comments: