Next Index Doc Set Home

C++ User's Guide



1. The C++ Compiler

Operating Environments

Standards Conformance

Organization of the Compiler

C++ Tools

The C++ Language
Type Checking
Classes and Data Abstraction
Object-Oriented Features
Native Language Support
Compatibility With C

2. Using the C++ Compiler

Compiler Commands

Command Syntax

Compiling and Linking

Compatibility Between C++ 4.0.1 and C++ 4.1

Compatibility Between C++ 4.1 and C++ 4.2

Multiple File Extensions
Suffix Additions to the System Default Makefile
Suffix Additions to Your Makefile


#pragma align
#pragma init and #pragma fini
#pragma ident
#pragma pack(n)
#pragma unknown_control_flow
#pragma weak

ccfe and ld
-o filename
-Qoption|-qoption prog opt
-Qproduce|-qproduce sourcetype
-R pathname

3. Templates

Function Templates
Template Declaration
Template Definition
Template Use
Template Instantiation

Class Templates
Template Declaration
Template Definition
Template Use

Nested Template Use

Template Specialization, Standard Method
Use and Instantiation

Template File Organization

Potential Problem Areas
Non-Local Name Resolution and Instantiation
Local Types as Template Arguments
Friend Declarations of Template Functions

Template Compilation
Verbose Compilation
Template Database
Options File
Compile-Time Versus Link-Time Instantiation

Template Instance Linkage
Static Instance Linkage
Global Instance Linkage
External Instance Linkage

Template Definition Searching
Source File Location Conventions
Source File Extensions
Definitions Search Path
Options File Definition Entries

Template Instance Automatic Consistency
Options File Nocheck Field

Template Specialization, Deprecated Method
Specialized Template Definitions
Options File Specialization Entries

4. Exception Handling

Why Exception Handling?

Using Exception Handling
An Example

Implementing Exception Handlers
Synchronous Exception Handling
Asynchronous Exception Handling

Flow of Control
Branching Into and Out of try Blocks and Handlers
Nesting of Exceptions
Using throw in a Function Declaration

Runtime Errors

set_terminate() and set_unexpected() Functions

Matching Exceptions With Handlers

Access Control in Exceptions

-noex Compiler Option

New Runtime Function and Predefined Exceptions

Default new-handler() Function

Building Shared Libraries With Exceptions

Using Exceptions in a Multithreaded Environment

5. Runtime Type Information

RTTI Options

typeid Operator

type_info Class

6. Cast Operations

Cast Operations Options

Const and Volatile Cast

Reinterpret Cast

Static Cast

Dynamic Cast

7. Moving From C to C++

Reserved and Predefined Words

Data Types

Creating Generic Header Files

Linking to C Functions

8. Fortran 77 Interface


Sample Interface

Compatibility Issues
Function versus Subroutine
Data Type Compatibility
Arguments Passed by Reference or Value
Uppercase and Lowercase
Underscore in Names of Routines

C++ Name Encoding
Array Indexing and Order
File Descriptors and stdio
File Permissions

Fortran Calls C++
Arguments Passed by Reference
Character Strings Passed by Reference
Arguments Passed by Value
Function Return Values
Labeled Common
I/O Sharing
Alternate Returns

C++ Calls Fortran
Arguments Passed by Reference
Arguments Passed by Value
Function Return Values
Labeled Common
I/O Sharing
Alternate Returns

A. Migration Guide

B. Code Samples

C. Localization Support


Next Index Doc Set Home