# Learn C++ On the Macintosh 1993 — source transcripts, page 1

[Canonical transcript page](https://www.vintageapple.net/transcripts/media/va-learn-c-on-the-macintosh-1993-167640/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-learn-c-on-the-macintosh-1993-167640/1#scan-f10807ff94de6fe45757f92a625f415311c8ad834118c73c1fdeadbce7e5111d)

Transcribed text:

Learn C++ on the Macintosh®

INCLUDES SPECIAL VERSION OF SYMANTEC C++ FOR MACINTOSH

Dave Mark

upgrade to full version of Symantec C++ for Macintosh—see inside for details

Image description: A dark teal book cover with large italic title text in teal, magenta, and yellow, a stylized white C++ logo over a magenta brush stroke, a floppy disk icon, and a yellow corner sticker at lower left.

Reading notes: Lower-left yellow corner sticker is cut off at the edge; text reads 'upgrade', 'll version', 'ymantec C++', 'Macintosh—', 'nside for details' and the full wording is inferred from the partial fragments, so the reconstructed 'upgrade to full version' is uncertain. The ® symbol after Macintosh is a registered-trademark mark and is transcribed as shown. Title and author are set in large stylized type; reading order follows title, subtitle, author.

Printed product names: Symantec C++ for Macintosh

Languages: English

[Original Image 1](https://www.vintageapple.net/files/c2d6d6cc23562a4d5506eebbc8f85aa09c2c3fcf8ecfe69fc31c7c7b7dc79e9e/96ee84a9da95399b53065f7d.webp)

### PDF page 1

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-learn-c-on-the-macintosh-1993-167640/1#scan-8da70adba7ce8fc44b8fb56282394fb085960762d55fb36a0c850d0b4a397c9a)

Transcribed text:

Learn C++ on the Macintosh®

INCLUDES SPECIAL VERSION OF SYMANTEC C++ FOR MACINTOSH

Dave Mark

pgrade ll version ymantec C++ Macintosh— nside for details

Image description: A dark teal book cover with large stylized title text in teal, magenta and yellow, a white stylized C++ logo with a magenta slash, a floppy disk icon, and a yellow corner sticker at lower left.

Reading notes: Yellow corner sticker at lower left is cut off; visible fragments read 'pgrade', 'll version', 'ymantec C++', 'Macintosh—' and 'nside for details' and the missing letters were not inferred. The ® after Macintosh is a registration mark, included as printed.

Printed product names: Symantec C++ for Macintosh

Languages: English

[Original PDF page 1](https://www.vintageapple.net/files/af49e55a2f1de51232675e70d8844b48216bd56458ec6ee007a492600c1e4a39/Learn_C-_On_the_Macintosh_1993.pdf#page=1)

### PDF page 2

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-learn-c-on-the-macintosh-1993-167640/1#scan-05b3ec346720e8d1bc34acd41092a4b8b0467525a2c03b6235f5380e1ee658db)

Learn Mac to sh®

Transcribed text:

Learn
Mac   to   sh®
INCLUDES
SPECIAL   VERSION
OF   SYMANTEC   C++
FOR   MACINTOSH
Dave Mark
... TT
Addison-Wesley Publishing Company
Reading, Massachusetts   •   Menlo   Park,   California   •   New York
Don   Mills,   Ontario   •   Wokingham , England   •   Amsterdam
Bonn   •   Sydney   •   Singapore   •   Tokyo   •   Madrid   •   San   Juan
Paris   •   Seoul   •   Milan   •   Mexico City   •   Taipei

Reading notes: Headline spacing and the ® symbol in the title are irregular in the extracted text.

Printed product names: Symantec C++

Languages: English

[Original PDF page 2](https://www.vintageapple.net/files/af49e55a2f1de51232675e70d8844b48216bd56458ec6ee007a492600c1e4a39/Learn_C-_On_the_Macintosh_1993.pdf#page=2)

### PDF page 3

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-learn-c-on-the-macintosh-1993-167640/1#scan-67565820800fdf9f18a65351c48be8cef303dbca25a5f9800358ddca331dc28d)

Transcribed text:

Many of the designations used by manufacturers and sellers to distinguish their products
are claimed as trademarks. Where those designations appear in this book, and Addison-
Wesley was aware of a trademark claim, the designations have been printed in initial capital
letters.
The authors and publishers have taken care in preparation of this book and software
package, but make no expressed or implied warranty of any kind and assume no responsi-
bility for errors orornissions. No liability is assumed for incidental or consequential damages
in connection with or arising out of the use of the information or programs contained herein.
Library   of Congress   Cataloging-in-Publication Data
Mark, Dave.
Learn C++ on the Macintosh: includes a special version of
Symantec's C++ compiler   I   Dave Mark.
p.   cm.
Includes bibliographical references and index.
ISBN 0-201-62204-1
1. Macintosh (Computer)--Prograrnrning.
language)   I.   Title.
QA76.8.M3M36772   1993
005.26'2--dc20
Copyright © 1993 by Dave Mark
2.   C++ (Computer program
93-61
CIP
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, electronic, mechanical, photocopying,
recording, or otherwise, without the prior written permission of the publisher. Printed in
the   United   States of America. Published simultaneously in Canada.
Sponsoring Editor: Keith Wollman
Project Editor: Elizabeth G. Rogalin
Production Coordinator: Gail McDonald Jordan
Cover design: Jean Seal
Icons in book designed by Crystal Sarno, Graphic Perspectives, Inc.
Set in 11 point Palatino by Rob Mauhar and Lenity Himburg,   CIP
123 4 5 6 7 8 9 -MA- 9796959493
First printing, June 1993

Reading notes: OCR damage in bibliographic data, e.g. 'Prograrnrning' and 'orornissions' Garbled CIP block line order Heading text 'Learn C++ on the Macintosh' treated as no primary heading in the supplied copy

Printed product names: Symantec's C++ compiler

Printed dates: 1993 · June 1993

Languages: English

[Original PDF page 3](https://www.vintageapple.net/files/af49e55a2f1de51232675e70d8844b48216bd56458ec6ee007a492600c1e4a39/Learn_C-_On_the_Macintosh_1993.pdf#page=3)

### PDF page 4

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-learn-c-on-the-macintosh-1993-167640/1#scan-1e3cc0920a74934071e3f09d9c24428bb6143f192fcca1dcf44016a04a276116)

Transcribed text:

To the rest of the quadrangle:
Daniel, Deneen, and Stu.
See you all New Year's Eve!

Image description: A mostly blank white card page with three lines of italic black serif handwriting-style text in the upper-middle area, the middle line indented to the right.

Reading notes: Headline is absent; the text is a short greeting rather than a titled advertisement. The apostrophe in "New Year's" appears as a typographic apostrophe; 'New Year's Eve' is not a numeric date.

Printed dates: New Year's Eve

Languages: English

[Original PDF page 4](https://www.vintageapple.net/files/af49e55a2f1de51232675e70d8844b48216bd56458ec6ee007a492600c1e4a39/Learn_C-_On_the_Macintosh_1993.pdf#page=4)

### PDF page 5

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-learn-c-on-the-macintosh-1993-167640/1#scan-70709294b4c79ebb92b075b67ede757f23cf26a45751d2c9fbce3125d5731403)

Transcribed text:

Preface   zx
Acknowledgments   xz
Chapter 1   Welcome Aboard   1
What's in the Package?   3
Why Learn C++?   4
What   Should   I   Know to Get Started?   4
What Equipment Do   I   Need?   5
The Lay of the Land   5
Strap   Yourself   In...   8
Chapter 2   Installing THIN C++   9
Installing   THIN   C++   12
Testing   THIN   C++   13
Features of   THIN   C++   16
Summary   19
Chapter 3   Remembering C   21
Literal   Constants   24
Variables   28
Operators   37
Statements   42   v

Reading notes: Table of contents layout with page numbers; some page numbers and spacing are irregular.

Printed product names: THIN C++

Languages: English

[Original PDF page 5](https://www.vintageapple.net/files/af49e55a2f1de51232675e70d8844b48216bd56458ec6ee007a492600c1e4a39/Learn_C-_On_the_Macintosh_1993.pdf#page=5)

### PDF page 6

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-learn-c-on-the-macintosh-1993-167640/1#scan-801e87f2ba5b6e09a68d7671d6601af9760836c8200e5938bb2322fa8938c02d)

Transcribed text:

vi   Contents
Functions   43
Preprocessor Directives   44
Comments   45
Summary   45
Chapter 4   Introducing C++   47
Getting C Code to Run under C++   50
New Features of C++   54
The   II   Comment Marker   54
Handling   Input   and   Output   55
Default   Argument Initializers   64
Reference   Variables   68
Function Name   Overloading   75
The new and   delete   Operators   79
The Scope Operator   85
lnline   Functions   88
Summary   91
Chapter 5   Object   Programming Basics   93
The Organizational Power of the Struct   96
Bundling Data and Functions   97
Creating an   Object   98
Accessing an Object's Data Members
and Member Functions   100
Deleting   an   Object   103
Writing   Class   Functions   104
Access   Priveleges   111
Bringing   It   All   Together   114
The friends Mechanism   119
Summary   126

Reading notes: Source appears to be a table of contents; no headline, products, prices or dates are present. Some OCR spacing irregularities in heading text (e.g., 'The   II   Comment Marker', 'Access   Priveleges') may need verification against the original.

Languages: English

[Original PDF page 6](https://www.vintageapple.net/files/af49e55a2f1de51232675e70d8844b48216bd56458ec6ee007a492600c1e4a39/Learn_C-_On_the_Macintosh_1993.pdf#page=6)

### PDF page 7

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-learn-c-on-the-macintosh-1993-167640/1#scan-050a58834ab27f68aa28c5f09eeaad967cb990f98702d0940ef84424ca43edbe)

Transcribed text:

Contents   vii
Chapter 6   Derived Classes   131
Inheritance   134
Derivation, Constructors, and Destructors   141
Base   Classes   and Constructors with Parameters   147
Overriding Member Functions   154
Summary   158
Chapter 7   Operator Overloading
The Operator   Overloading   Alternative   165
A Few Restrictions   173
Covering   All   the Bases   174
Special   Cases   183
Summary   204
Chapter 8   Inside iostream
The Character-Based   Interface   208
The iostream   Classes   208
Working with   Files   216
The iostream   State   Bits   220
More   File   Info   226
Customizing iostream
Formatting Your   Output
228
234
Using   Manipulators   240
istrstream and ostrstream   241
Summary   244
Chapter 9   C++ Potpourri
Templates   248
The   Templates   Approach   249
161
205
245

Reading notes: Source is a table of contents; no headline or advertised products or prices present. Some chapter page numbers appear out of order in the extracted text, so reading order may be uncertain.

Languages: English

[Original PDF page 7](https://www.vintageapple.net/files/af49e55a2f1de51232675e70d8844b48216bd56458ec6ee007a492600c1e4a39/Learn_C-_On_the_Macintosh_1993.pdf#page=7)

### PDF page 8

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-learn-c-on-the-macintosh-1993-167640/1#scan-5371e72b7f9f9267a233c49dad5f663765a5242c37d02f12d0a21ae28e96b7ce)

Transcribed text:

viii   Contents
Multiple   Inheritance   260
Resolving   Ambiguities   270
Initialization   Versus Assignment   280
Memberwise   Initialization   284
Summary   292
Chapter   10   Moving   On   293
Appendices
The   User   Interface   295
The Macintosh   Toolbox   297
Class   Libraries   299
Books and   Other   Reference   Material   301
Go Get 'Em...   305
Appendix A
Appendix B
Appendix C
Appendix D
Appendix E
Appendix F
Appendix G
Appendix H
Appendix   I
Glossary   307
Source   Code Listings   313
fstream.h   351
iomanip.h   359
iostream.h   361
strstrea.h   385
Unoffical   C++   Style   Guide
The   Complete   Symantec C++
Development   Environment
Bibliography   439
391
429

Reading notes: Table of contents page; no primary headline identified Page numbers and some entries may be partially ambiguous in reading order

Printed product names: Symantec C++ · Development Environment

Languages: English

[Original PDF page 8](https://www.vintageapple.net/files/af49e55a2f1de51232675e70d8844b48216bd56458ec6ee007a492600c1e4a39/Learn_C-_On_the_Macintosh_1993.pdf#page=8)

### PDF page 9

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-learn-c-on-the-macintosh-1993-167640/1#scan-0abbaa400d0bafc8ab6db633c879a6a5ca562a07b01cd98f3a8e5ab14ea8749a)

Transcribed text:

Some   time ago, back in 1988 or 1989, I remember reading an article written by
someone at Apple Computer. The article was addressed to all Macintosh pro-
grammers, and spoke to the future of Macintosh software development. Back
then, the vast majority of Macintosh programs were written in either C or Pascal.
Sure,   there might have been a little Basic here, and a little C++ there, but those
languages were viewed as the fringe-a definite minority.
Anyway, this article went on to describe the wonders of object programming
and of C++ in particular. Normally, I would have turned the page, since I was
perfectly happy programming in C and Pascal, my personal languages of choice.
But this article quickly captured my attention. As I read, I began to realize
something basic was happening. This article wasn't just an interesting discus-
sion of an alternative development methodology.   It   was a warning shot across
my bow. Apple was making a real commitment to object programming and to
C++. At development conferences, the message was also becoming clear. Apple
expected all Macintosh software developers not just to understand, but to em-
brace object programming.
Pay   attention to this message:   Object   programming is the future, and C++ is
the language for object programming. Why C++? Apple rewrote MacApp (their
object development library) entirely in C++. Apple rewrote much of their operat-
ing system in C++. When   Symantec   and Apple announced their joint cross-
platform development library, Bedrock, they made it clear that Bedrock would
be written entirely in C++.
Once   you've made the commitment to learn about object programming and
C++, you're ready to take the next step. Bring this book home with you (pay for
it first) and start reading.   Learn   C++   on the Macintosh   will do the rest.
By the way, if you feel like getting in touch, I'd love to hear from you. Get on
CompuServe,   type   GO   MA   CD   EV,   and leave a message in the   Learn Programming
section (section 11). In the meantime, let's get started   ...
D.M.
Arlington, Virginia
ix

Reading notes: Headline not clearly identified in the supplied copy; the book title 'Learn C++ on the Macintosh' appears in body text only.

Printed product names: MacApp · Bedrock · CompuServe · Learn C++ on the Macintosh

Printed dates: 1988 · 1989

Languages: English

[Original PDF page 9](https://www.vintageapple.net/files/af49e55a2f1de51232675e70d8844b48216bd56458ec6ee007a492600c1e4a39/Learn_C-_On_the_Macintosh_1993.pdf#page=9)

### PDF page 10

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-learn-c-on-the-macintosh-1993-167640/1#scan-986ebde2968674f580c82edb10de327520ddd9cd1bbdbf4ea2b2d3b36208ef0d)

Transcribed text:

I'd like to take a few moments to thank all the people who made this book
possible. First and foremost, I'd like to thank my good friend Steve Baker. His
programming experience and C   ++ expertise provided invaluable assistance.
Steve put in a lot of long hours helping to put this book together. Whether he was
fine tuning the table of contents or tinkering with one of my C++ sample
programs, Steve's heart and soul were poured into this book. By the way, thanks
also to Steve's family, Kelly, Michael, and Matthew, for patience and understand-
ing above and beyond the call of duty.
Thanks to Elizabeth Rogalin, my friend, confidante, and project editor, for
seeing this book through. Thanks, Elizabeth!
Thanks to Steve Bushell and Jaime Jouris at Symantec for putting together
THIN C++ and for answering all my questions.
Thanks to Dan Weston, C++ guru extraordinaire, for his awesome tech
review. Dan helped keep this book on the straight and narrow path to C++
correctness.
Thanks to my old pal Julie Stillman up in Vermont. Happy birthday to you!
Wish I could have been there.
Thanks to Crystal Sarno for her excellent artwork. Crystal designed the icons
sprinkled throughout the book.
Thanks to Jean Peck for an incredible job copyediting the book.
Thanks to Carlos Derr for guidance and friendship.
Finally, thanks to Deneen Joanne Melander, for companionship, love, and
understanding. LFUEMISOK?
xi

Reading notes: Closing line 'LFUEMISOK?' is unclear and may be a damaged or encoded fragment Spacing in 'C   ++' may be an OCR artifact

Printed product names: THIN C++

Languages: English

[Original PDF page 10](https://www.vintageapple.net/files/af49e55a2f1de51232675e70d8844b48216bd56458ec6ee007a492600c1e4a39/Learn_C-_On_the_Macintosh_1993.pdf#page=10)

### PDF page 11

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-learn-c-on-the-macintosh-1993-167640/1#scan-997b9d4560ecd34c6eff66499542493802b9d808afd052f01fc81db9bd15042b)

Transcribed text:

Chapter 1
Interested in learning how to
program in C++? Well, you've
come to the right place. Grab
your Mac, hop into your most
comfortable chair, and read
on...
'.
'
1

Reading notes: Source text is a fragment with a chapter label and no primary heading; headline set to null. Trailing stray marks ('.', ''', '1') are of uncertain significance.

Languages: English

[Original PDF page 11](https://www.vintageapple.net/files/af49e55a2f1de51232675e70d8844b48216bd56458ec6ee007a492600c1e4a39/Learn_C-_On_the_Macintosh_1993.pdf#page=11)

[Next transcribed scans](https://www.vintageapple.net/transcripts/media/va-learn-c-on-the-macintosh-1993-167640/2.md)
