O'Reilly logo

Just Enough C/C++ Programming by Guy W. Lecky-Thompson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Complex Data Types

The basic types are enough to process any kind of information. However, to represent certain real-world objects (such as addresses), creating a representative complex type is a more efficient way to construct the program code.

These complex types are known as structures, or structs, and allow the programmer to create a record containing several fields, each of which can be a basic type or another struct. Knowing how to break down the real-world objects into a series of complex data types is part of the skill set that you need to create useful programs.

The added flexibility comes with some caveats, however. A struct has no intrinsic value and therefore cannot be operated directly upon. In other words, the only value held by ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required