C++ Programming Guide

Accessing Sun Documents Online

Sun WorkShop documentation is available online from several sources:

Using the docs.sun.com Web site

The docs.sun.com Web site enables you to access Sun technical documentation online. You can browse the docs.sun.com archive or search for a specific book title or subject. The URL is http://docs.sun.com.

Accessing AnswerBook2 Collections

The Sun WorkShop documentation is also available using AnswerBook2 software. To access the AnswerBook2 collections, your system administrator must have installed the AnswerBook2 documents during the installation process (if the documents are not installed, see your system administrator or Chapter 3 of Sun WorkShop Quick Install for installation instructions). For information about accessing AnswerBook2 documents, see Chapter 6 of Sun WorkShop Quick Install, Solaris installation documentation, or your system administrator.


Note -

To access AnswerBook2 documents, Solaris 2.5.1 users must first download AnswerBook2 documentation server software from a Sun Web page. For more information, see Chapter 6 of Sun WorkShop Quick Install.


Accessing HTML Documents

The following Sun Workshop documents are available online only in HTML format:

To access these HTML documents:

  1. Open the following file through your HTML browser:

    install-directory/SUNWspro/DOC5.0/lib/locale/C/html/index.html

    Replace install-directory with the name of the directory where your Sun WorkShop software is installed (the default is /opt).

    The browser displays an index of the HTML documents for the Sun WorkShop products that are installed.

  2. Open a document in the index by clicking the document's title.

Accessing Sun WorkShop Online Help and Release Notes

This release of Sun WorkShop includes an online help system as well as online manuals. To find out more see:

Man Pages

Online man pages provide immediate documentation about a command or library function. You can display a man page by running the command:


demo% man topic

Man pages are in:

opt-install-dir/SUNWspro/man

Table P-1 lists and describes the C++ man pages.


Note -

Before you use the man command, at the beginning of your search path, insert the name of the directory in which you have chosen to install the C++ compiler. This enables you to use the man command. This is usually done in the .cshrc file, in a line with setenv MANPATH at the start; or in the .profile file, in a line with export MANPATH at the start.


Table P-1 C++ Man Pages

Title 

Description 

CC 

Drives the C++ compilation system 

cartpol 

Provides Cartesian/polar functions in the C++ complex number math library 

cplx.intro 

Introduces the C++ complex number math library 

cplxerr 

Provides complex error-handling functions in the C++ complex number math library 

cplxops 

Provides arithmetic operator functions in the C++ complex number math library 

cplextrig 

Provides trigonometric operator functions in the C++ complex number math library 

demangle 

Decodes a C++ encoded symbol name 

filebuf 

Buffer class for file I/O 

fstream 

Provides stream class for file I/O 

istream 

Supports formatted and unformatted input 

ios 

Provides basic iostream formatting 

ios.intro 

Introduces iostream man pages 

manip 

Provides iostream manipulators 

ostream 

Supports formatted and unformatted output 

queue 

Provides list management for task library 

sbufprot 

Provides protected interface of streambuffer base class 

sbufpub 

Provides public interface of streambuffer base class 

sigfpe 

Allows signal handling for specific SIGFPE codes 

ssbuf 

Provides buffer class for character arrays 

stdarg 

Handles variable argument list 

stdiobuf 

Provides buffer and stream classes for use with C stdio 

stream_locker 

Provides class used for application level locking of iostream class object 

stream_MT 

Base class that provides dynamic changing of iostream class object to and from MT safely 

strstream 

Provides stream class for I/O using character arrays 

varargs 

Handles variable argument list 

vector 

Provides generic vector and stack 

Table P-2 lists man pages that contain information related to the C++ compiler.

Table P-2 Man Pages Related to C++

Title 

Description 

c++filt 

Copies each file name in sequence and writes it in the standard output after decoding symbols that look like C++ demangled names. 

dem 

Demangles one or more C++ names that you specify 

fbe 

Creates object files from assembly language source files. 

fpversion 

Prints information about the system CPU and FPU 

gprof 

Produces execution profile of a program 

ild 

Links incrementally, allowing insertion of modified object code into a previously built executable 

inline 

Expands assembler inline procedure calls 

lex 

Generates lexical analysis programs 

rpcgen 

Generates C/C++ code to implement an RPC protocol 

version 

Displays version identification of object file or binary 

yacc 

Converts a context-free grammar into a set of tables for a simple automaton that executes an LALR(1) parsing algorithm 

README file

The README file highlights important information about the compiler, including:

README files are in:

opt-install-dir/SUNWspro/READMEs

To view the C++ compiler README file, type:


%CC -readme