# Symantec C++ Programming For The Macintosh 1993 — source transcripts, page 1

[Canonical transcript page](https://www.vintageapple.net/transcripts/media/va-symantec-c-programming-for-the-macintosh-1993-1a2e93/1)

## Transcribed source material

Machine transcriptions and image descriptions; uncertain copy may be marked [illegible]. Verify against the linked originals. Historical rights remain with the original owners.

These are transcribed excerpts, not the full publications. Open the originals for remaining pages.

### Image 1

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-symantec-c-programming-for-the-macintosh-1993-1a2e93/1#scan-bbb227be0d6ffa9ad0133971ccf5b20948251e6521d7e5f0ac2652990fda72e1)

SYMANTEC C++ PROGRAMMING FOR THE MACINTOSH

Transcribed text:

SYMANTEC.
TM
SYMANTEC C++
PROGRAMMING
FOR THE MACINTOSH
NEIL RHODES and JULIE McKEEHAN
THE EASIEST APPROACH TO OBJECT-ORIENTED PROGRAMMING!
Includes the source code for all the programs in the book
DISK INSIDE!

Image description: Book cover with a blue top band, white title area, and blue grid background featuring a yellow triangle, blue circle, and red quadrilateral against a black rectangular outline, with a floppy disk graphic in the lower right.

Reading notes: Bottom-left tagline is cut off at the left edge; the visible text reads 'THE EASIEST APPROACH TO' and 'OBJECT-ORIENTED PROGRAMMING!' with the first letters partly cropped, so the full wording is inferred from visible fragments. The large title's first letter 'S' is partly cropped at the left edge; the transcript reflects the visible 'SYMANTEC'. The 'Includes the source code for all the programs in the book' text and 'DISK INSIDE!' label are small and partly overlapping the floppy graphic.

Printed product names: Symantec C++

Languages: English

[Original Image 1](https://www.vintageapple.net/files/821efe52ef10ab17a3df8c72d20e4ce9f0f9304f70c4f0dae63e4107ae99bf6c/388d9cea1f5187edf60c6b12.webp)

### PDF page 1

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-symantec-c-programming-for-the-macintosh-1993-1a2e93/1#scan-a6a82c36c528723eea57243202c16dffd68a01e158478ebeba095608d3592fca)

SYMANTEC C++ PROGRAMMING FOR THE MACINTOSH

Transcribed text:

SYMANTEC.™
SYMANTEC C++
PROGRAMMING
FOR THE MACINTOSH
NEIL RHODES and JULIE McKEEHAN
THE EASIEST APPROACH TO OBJECT-ORIENTED PROGRAMMING!
Includes the source code for all the programs in the book
DISK INSIDE!

Image description: A book cover with a blue top band, a white upper panel holding bold black title text and blue author names, and a blue grid-patterned lower panel showing a large yellow triangle, a red quadrilateral, a small blue circle, and a black rectangle outline, with a red floppy disk icon labeled DISK INSIDE! at lower right.

Reading notes: The bottom-left tagline is cropped at the image edge; it is read as 'THE EASIEST APPROACH TO' and 'OBJECT-ORIENTED PROGRAMMING!' with the leading letters of the second line cut off, so the visible text is 'OBJECT-ORIENTED PROGRAMMING!' with the first letter partly missing. The leading 'S' of the large title SYMANTEC is partly cropped at the left edge of the image. The small TM mark after SYMANTEC. is read as a trademark symbol.

Printed product names: Symantec C++

Languages: English

[Original PDF page 1](https://www.vintageapple.net/files/443053fa672c901a8080986a7a7ab36829d1f77400346379ab9d3360a575aebf/Symantec_C-_Programming_For_The_Macintosh_1993.pdf#page=1)

### PDF page 2

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-symantec-c-programming-for-the-macintosh-1993-1a2e93/1#scan-16bed9c133e53b58500d80380f0b209d3e788f3345e859107a001da7eda0c9b6)

Image description: The image is a plain, entirely blank white page with no artwork, layout elements, or markings visible.

[Original PDF page 2](https://www.vintageapple.net/files/443053fa672c901a8080986a7a7ab36829d1f77400346379ab9d3360a575aebf/Symantec_C-_Programming_For_The_Macintosh_1993.pdf#page=2)

### PDF page 3

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-symantec-c-programming-for-the-macintosh-1993-1a2e93/1#scan-0ff314aa414a019485c35a283382ceb0611e7973d5009665e1cfb206c1670eb6)

Transcribed text:

Symantec   C++
Programming tor
the Macintosh Neil Rhodes
Julie McKeehan
llllBrady
New   York   London   Toronto   Sydney   Tokyo   Singapore

Reading notes: Source text shows 'tor' and 'Macintosh' spacing as extracted; 'Brady' appears as a publisher imprint with a possible OCR artifact 'llll'

Printed product names: Symantec C++

Languages: English

[Original PDF page 3](https://www.vintageapple.net/files/443053fa672c901a8080986a7a7ab36829d1f77400346379ab9d3360a575aebf/Symantec_C-_Programming_For_The_Macintosh_1993.pdf#page=3)

### PDF page 4

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-symantec-c-programming-for-the-macintosh-1993-1a2e93/1#scan-067e479bb93712722b54c793e4ba466eafe1ca6b7ae54c9dce9a907ef14f3a91)

Transcribed text:

I
IV
Copyright© 1993 by Neil Rhodes and Julie McKeehan
All rights reserved, including the right of reproduction in whole or in
part in any form.
Brady Publishing
A Division of Prentice Hall Computer Publishing
15 Columbus Circle
New York, NY   10023
ISBN:   1-56686-049-0
Library of Congress Catalog No.:   93-1660
Printing Code: The rightmost double-digit number is the year of the
book's printing; the rightmost single-digit number is the number of
the book's printing. For example, 93-1 shows that the first printing of
the book occurred in 1993.
96 95 94 93   4 3 2 1
Manufactured in the   United   States of America
limits   ol   LiabililV   and   Disclaimer   ol   Warranty
The authors and publisher of this book have used their best efforts in
preparing this book and the programs contained in it. These efforts
include the development, research, and testing of the theories and
programs to determine their effectiveness. The authors and publisher
make no warranty of any kind, expressed or implied, with regard to
these programs or the documentation contained in this book. The
authors and publisher shall not be liable in any event for incidental or
consequential damages in connection with, or arising out of, the
furnishing, performance, or use of these programs.
Trademarks
Most computer and software brand names have trademarks or regis-
tered trademarks. The individual trademarks have not been listed here.
srmantec   C++   Programming   lor   the   Macintosh

Reading notes: Trademark line text 'srmantec C++ Programming lor the Macintosh' contains OCR-style damage ('srmantec' likely 'Symantec', 'lor' likely 'for'). Printing code block is ambiguous about the dates '93' and '1993' as copyright year versus printing year.

Printed dates: 1993 · 93

Languages: English

[Original PDF page 4](https://www.vintageapple.net/files/443053fa672c901a8080986a7a7ab36829d1f77400346379ab9d3360a575aebf/Symantec_C-_Programming_For_The_Macintosh_1993.pdf#page=4)

### PDF page 5

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-symantec-c-programming-for-the-macintosh-1993-1a2e93/1#scan-85f9748b8969d8c9e05e9734d27049061d442e7348a22fc6007efb130e0466cd)

Transcribed text:

To my mother, Mary, who taught me to always take a book wherever I go.
Books have provided me a lifetime of   reward, as has she.
Neil Rhodes
To my parents, Gloria and Richard McKeehan, who taught me to   fi.nish   what I
start, even if   it's harder than I thought.   And,   to my best friend, Barbie who
mothered my children, fed my dogs, and did a thousand things without hesita-
tion to ensure I would have a life to come back to.
Julie McKeehan
v srmanlec   C++   Programming   tor   Iba   Macintosh

Reading notes: Running header or title line 'v srmanlec C++ Programming tor Iba Macintosh' is garbled; likely 'Programming for the Macintosh' with damaged characters. Dedication text contains hyphenation and line-break artifacts (e.g., 'hesita-tion', 'fi.nish').

Languages: English

[Original PDF page 5](https://www.vintageapple.net/files/443053fa672c901a8080986a7a7ab36829d1f77400346379ab9d3360a575aebf/Symantec_C-_Programming_For_The_Macintosh_1993.pdf#page=5)

### PDF page 6

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-symantec-c-programming-for-the-macintosh-1993-1a2e93/1#scan-34b1850e51c7d00c984be2162b56b1b798c1208ddca5bee481a475eb8722ae20)

Transcribed text:

•
Vl
Credits
Publisher
Michael Violano
Managing Ednor
Kelly D. Dobbs
Developmental   Ednor
Perry   King
Production   Ednor
Kristin Juba
Edftorlal   Assistant
Lisa Rose
Book Designers
Michele Laseau
Kevin Spear
Cover Designer
HUB Graphics
Indexer
Jeanne Clark
Craig Small
Production   Team
Diana Bigham
Katy Bodenmiller
Julie Brown
Tim Cox
Mark Enochs
Sean Medlock
Linda Seifert
Greg Simsic
Beth Rago
Carrie Roth
srmanlec   C++   Programming   tor   Iba   Macintosh

Reading notes: Heading line 'srmanlec C++ Programming tor Iba Macintosh' appears garbled; likely 'Programming C++ for the Macintosh' with damaged characters.

Languages: English

[Original PDF page 6](https://www.vintageapple.net/files/443053fa672c901a8080986a7a7ab36829d1f77400346379ab9d3360a575aebf/Symantec_C-_Programming_For_The_Macintosh_1993.pdf#page=6)

### PDF page 7

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-symantec-c-programming-for-the-macintosh-1993-1a2e93/1#scan-3af3294d94b92d769253e8321aa0f1aca8ba3adf401a761d88b368f83cffc3b0)

Transcribed text:

Acknowledgments
Writing a book about prerelease software is a bit like skydiving with a
prototype parachute. Even though you would not jump without
enormous faith in the parachute manufacturer, you still are filled with
spine tingling tension until you pull the cord and everything goes
according to plan. We had the same experience writing this book.
Symantec has produced consistently excellent Macintosh software in
the past, so we had confidence that this product would be no differ-
ent. But, in the midst of working with the prerelease versions of
Symantec C++, we many times thought ourselves fools for writing
about how to use something that was not yet usable. Not that there
was anything unusual about Symantec C++-any prerelease software
contains such bumps and kinks. Otherwise,   it   would not be prerelease.
This all goes to say that, although we tried to ensure that no mistakes
crept into the text, there are doubtless some. While the presence of
any errors is solely our responsibility, we would be grateful if you
report any you find in the text or in the programs. We also will
gratefully acknowledge you in the next edition   if   you find an error we
do not know about already.
This book is the product of many peoples' labors besides our own, and
these people deserve recognition for their contributions. Many thanks
go especially to   Perry   King, our editor at Brady, for all his efforts under
a tight deadline. This work has been much improved by the touch of
his skilled hand-from suggestions on content to the review of each
chapter. Likewise, our production editor, Kristin Juba, worked just as
valiantly. We consider ourselves fortunate to have worked with such
professionals. Thanks also to Tracy   Smith   (the then acquisitions editor)
at Brady, who approached us about writing this book. Gratitude as
well to Carole McClendon, our agent at Waterside Productions, for
making the contract negotiation an almost painless process.
Many thanks also go to   Phil   Shapiro at Symantec. He quickly re-
sponded to all our questions about Symantec C++, even with a very
busy schedule of his own. He is a bright guy, and Symantec is lucky to
have him. To all the other people on the Symantec C++ team, from
the product manager to the programmers to the manual writers, our
thanks for producing a product we are proud to write about.
••
Vll SVmantec   C++   Programming   tor   the   Macintosh

Reading notes: Page header 'Symantec C++ Programming for the Macintosh' and page number 'Vll' are partly garbled in the extracted text. Hyphenated line breaks and spacing irregularities in the acknowledgments text may affect exact spelling of some words.

Printed product names: Symantec C++

Languages: English

[Original PDF page 7](https://www.vintageapple.net/files/443053fa672c901a8080986a7a7ab36829d1f77400346379ab9d3360a575aebf/Symantec_C-_Programming_For_The_Macintosh_1993.pdf#page=7)

### PDF page 8

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-symantec-c-programming-for-the-macintosh-1993-1a2e93/1#scan-392e019bcd71eef78838190ff3ba9594f71fa81c7f4ffc6465e0829386c2f02e)

Transcribed text:

...
Vlll
We owe a special debt of gratitude to Dave Wilson for his willingness
to contribute programming time to this book. Dave is not only a fine
teacher but a good friend as well. As the original impulse behind Neil's
getting into the programmer training business, he cannot be thanked
enough.
Thanks to all of our students, but particularly to Neil's students at
Apple Developer   University.   No teacher could ask for a better, brighter
bunch to learn from.
In the more general realm, we also would like to thank Apple Com-
puter for producing the PowerBook and DuoBook on which this entire
book was written. We can hardly wait to see what they will cook up
next. Thanks also to Joel West for getting us into the Macintosh
software business and for being the impetus behind our striking out on
our own.
Last, but not least, our heartfelt gratitude goes to Loring and Barbie
Fiske-Phillips.   It   is only because of their generosity and unceasing
labors on our behalf that this book was finished on time. No one could
ask for better friends   .
srmantec   C++   Programming   tor   tbe   Macintosh

Reading notes: Running header 'srmantec C++ Programming tor tbe Macintosh' has OCR-damaged characters ('srmantec', 'tor', 'tbe') Trailing 'No one could ask for better friends .' and page marker 'Vlll' are uncertain in reading order

Printed product names: PowerBook · DuoBook · Macintosh · C++

Languages: English

[Original PDF page 8](https://www.vintageapple.net/files/443053fa672c901a8080986a7a7ab36829d1f77400346379ab9d3360a575aebf/Symantec_C-_Programming_For_The_Macintosh_1993.pdf#page=8)

### PDF page 9

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-symantec-c-programming-for-the-macintosh-1993-1a2e93/1#scan-be5aa26851f2f9e273da79f09776fdbe62e9f8b3b1c351acfcf240388a213ee0)

Transcribed text:

Contents
Introduction ............................................................. xxi
The New C++ from Symantec ............................... xii
What This Book Has To Offer ............................ xxiii
What   You   Should Know ..................................... xxv
What Is in This Book .......................................... xxv
How   You   Should Read This Book ...................... xxvi
Pan   1 The   Symantec   C++ Environment
1 Creating a   Project   ........................................................ 3
The Symantec C++ Folders ....................................   .4
Installing Symantec C++ ......................................... 6
Creating a New Project ........................................... 7
Creating a Source File .............................................   9
Adding a Single Source File to the Project ............ 11
Adding Libraries or Multiple Files to the Project .. 12
The Add Files Dialog ......................................... 13
Adding Libraries to Projects .............................. 14
Source Files in the Project Window .................. 15
Running the Program ........................................... 16
Errors in a Project .................................................. 18
Compile Errors .................................................. 18
Link Errors ........................................................ 19
Avoiding Dialogs ...................................................   20
Avoiding the Project Update Dialog .................   20
Avoiding the Save Changes Dialog .................. 21
Project-Building Shortcuts .................................... 22
Summary ............................................................... 24
2 A Multiple-File   Project   ............................................... 25
Adding More Files to a Project .............................. 26
Adding Include Files .............................................   30
Compiling a Single File ......................................... 32
Checking for Syntax Errors ................................... 33
Removing Objects ................................................. 34
Searching through Multiple Files ......................... 35
One-at-a-Time Searches .................................... 38
Batch Searches .................................................. 39
Segmenting   Your   Program .................................... 39
Using Both C and C++ .......................................... 41
File Extensions ...................................................... 44
Summary ............................................................... 47
•
IX srmantac   C++   Programming   tor   Iba   Macintosh

Reading notes: Page numbers and dot leaders in the table of contents may be imprecise due to OCR spacing Some heading spacing appears irregular, such as 'Pan 1' likely meaning 'Part 1'

Languages: English

[Original PDF page 9](https://www.vintageapple.net/files/443053fa672c901a8080986a7a7ab36829d1f77400346379ab9d3360a575aebf/Symantec_C-_Programming_For_The_Macintosh_1993.pdf#page=9)

### PDF page 10

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-symantec-c-programming-for-the-macintosh-1993-1a2e93/1#scan-d90eb5b9c76f6c546af290574ec21491d372d11856b7c3a492b1eba97a8a0113)

Transcribed text:

3 Interpreting Error Messages ......................................   49
An Error-Ridden   Sample   Program .........................   50
The Compile Errors of an Error-Ridden
Program ................................................................. 52
Link Errors .............................................................   54
Choosing the Number of Errors To Report ..........   55
Getting Rid of Warnings .......................................   5   7
Establishing a Philosophy about Warnings ..... 57
The Three Rules of Warning Elimination ........ 58
Summary   ...............................................................   60
4   Debugging a Program ................................................ 61
Turning   On   the Debugger .................................... 62
Starting   Programs with the Debugger Activated .. 63
Command Options ............................................... 64
The   Step   Command .......................................... 65
The Trace Command ........................................ 6   7
The   Out   Command .......................................... 68
The In Command ............................................. 69
The Go Command ............................................   70
The   Stop   Command .........................................   70
Putting a Command in Automatic Mode .........   70
Showing   the Call Chain ........................................ 71
Examining Functions in the   Source   Window ...... 72
Using   Breakpoints ................................................. 73
Examining and   Setting   the Values of Variables ... 74
Using   Debugger Statements in Programs ............. 77
Calling Functions from the THINK Debugger ...... 78
Low-Level Debuggers ............................................ 82
Using   Two   Screens   ................................................ 83
Summary ............................................................... 84
5   Using   Resource Utilities ............................................. 85
Writing a Program That   Uses   Resources ............... 86
Creating the Project .......................................... 86
What the Program Does ................................... 89
Including Resources in the Program .....................   90
Creating Resources with ResEdit ......................   90
Adding Resources Directly ................................ 91
Creating Resources with THINK Rez ..................... 92
Comparing THINK Rez with ResEdit .................... 94
THINK Rez Advantages .....................................   95
ResEdit Advantages ........................................... 95
Exercise ................................................................. 96
x svmantac   C++   Programming   tor   the   Macintosh

Reading notes: Source is a table of contents with page numbers, not advertising copy; headline is null.

Languages: English

[Original PDF page 10](https://www.vintageapple.net/files/443053fa672c901a8080986a7a7ab36829d1f77400346379ab9d3360a575aebf/Symantec_C-_Programming_For_The_Macintosh_1993.pdf#page=10)

### PDF page 11

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-symantec-c-programming-for-the-macintosh-1993-1a2e93/1#scan-3bca0c981fe1aa97d04a8943756b22225f79728e8a42c65a6c753fd6734fa6bc)

Transcribed text:

6 Building an Application ............................................ 97
Setting Build   Options   ............................................ 98
Creator .............................................................. 99
Program   Type ..................................................   100
Partition   Size   ...................................................   100
The   SIZE   Flags .................................................   101
Far   CODE   and Far DATA ................................   103
Separate   STRS   ..................................................   104
Building the Application ....................................   104
Smart   Link .......................................................   105
Summary .............................................................   106
7   Using   Precompiled Headers ....................................   107
Using   Precompiled Headers ................................   108
Standard Precompiled Header Files ....................   109
Effects of Compiling with
Precompiled Headers ..........................................   110
Using   Precompiled Headers in Individual Files .. 112
Creating Precompiled Headers ........................... 113
Changing Header Files ........................................ 114
Creating a Precompiled Header File ................... 115
Customizing MacHeaders++ or TCL++ ........... 118
Summary ............................................................. 119
Pan   2 The   Elements   ol   C++
8 C++:   An   Enhanced C ................................................ 123
Overview ............................................................. 124
Standard Input/Output ....................................... 125
Eliminating Errors in   1/0   Operations ............. 125
Streams Enable   User   Extension ...................... 127
More Examples of Streams .............................. 128
The New Form of Comments ............................. 129
Declarations Mixed with
Executable Statements ........................................ 131
Typedefing and   Structs   ....................................... 134
Default Arguments .............................................. 135
Error Checking .................................................... 136
Wamings ......................................................... 136
Compile-Time Type Checking ........................ 137
Type-Safe Linkage ........................................... 138
Overloaded Functions ......................................... 139
Memory Allocation/Deallocation ....................... 141
Eliminating #define ............................................ 143
•
XI srmantac   C++   Programming   tor   lbe   Macintosh

Reading notes: Source text is a table of contents with OCR-like artifacts such as spaced letters and garbled characters ('1/0', 'srmantac'); some entries may be misread. Printed title line 'Pan 2 The Elements ol C++' contains likely OCR errors.

Languages: English

[Original PDF page 11](https://www.vintageapple.net/files/443053fa672c901a8080986a7a7ab36829d1f77400346379ab9d3360a575aebf/Symantec_C-_Programming_For_The_Macintosh_1993.pdf#page=11)

[Next transcribed scans](https://www.vintageapple.net/transcripts/media/va-symantec-c-programming-for-the-macintosh-1993-1a2e93/2.md)
