Types and Expressions

This chapter seeks to provide a deeper understanding of C++'s strong typing system, and shows how expressions are evaluated and converted.

19.1

Operators

438

19.2

Evaluation of Logical Expressions

443

19.3

Enumerations

443

19.4

Signed and Unsigned Integral Types

445

19.5

Standard Expression Conversions

447

19.6

Explicit Conversions

449

19.7

Safer Typecasting Using ANSI C++ Typecasts

450

19.8

Run-Time Type Identification (RTTI)

454

19.9

Member Selection Operators

457

Here we formally define some terms that we have been using. Operators are special kinds of functions that perform calculations on operands and return results. Operands are the arguments supplied to the operator.

Operators can be thought of as ordinary functions, except that it is possible to call them using operator symbols (e.g.,+, -, *, /, etc.) in addition to the longer function-call syntax.

An expression consists of a single operand, multiple operands with operators interspersed, or functions with arguments. Each expression has a type and a value. The value is obtained by applying the definitions of the operators and/or functions to the operands (and/or arguments).


Part I: Introduction to C++ and Qt 4

C++ Introduction

Classes

Introduction to Qt

Lists

Functions

Inheritance and Polymorphism

Part II: Higher-Level Programming

Libraries

Introduction to Design Patterns

QObject

Generics and Containers

Qt GUI Widgets

Concurrency

Validation and Regular Expressions

Parsing XML

Meta Objects, Properties, and Reflective Programming

More Design Patterns

Models and Views

Qt SQL Classes

Part III: C++ Language Reference

Types and Expressions

Scope and Storage Class

Statements and Control Structures

Memory Access

Chapter Summary

Inheritance in Detail

Miscellaneous Topics

Part IV: Programming Assignments

MP3 Jukebox Assignments

Part V: Appendices

MP3 Jukebox Assignments

Bibliography

MP3 Jukebox Assignments



An Introduction to Design Patterns in C++ with Qt 4
An Introduction to Design Patterns in C++ with Qt 4
ISBN: 0131879057
EAN: 2147483647
Year: 2004
Pages: 268

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net