Practical c++ programming
Steve Oualline
O'Reilly & Associates, Inc. Beijing · Cambridge · Köln · Paris · Sebastopol · Taipei · Tokyo
Page iv
Practical C++ Programming by Steve Oualline Copyright © 1995 O'Reilly & Associates, Inc. All rights reserved. Printed in the United States of America. Editors: Adrian Nye and Dale Dougherty Production Editor: Nicole Gipson Printing History: August 1995 First Edition. January 1997: Minor corrections. Nutshell Handbook, the Nutshell Handbook logo, and the O'Reilly logo are registered trademarks and The Java Series is a trademark of O'Reilly & Associates, Inc. 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 O'Reilly & Associates, Inc. was aware of a trademark claim, the designations have been printed in caps or initial caps. While every precaution has been taken in the preparation of this book, the publisher assumes no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein.
This book is printed on acid-free paper with 85% recycled content, 15% post-consumer waste. O'Reilly & Associates is committed to using paper with the highest recycled content available consistent with high quality. ISBN. 1-56592-139-9 [12/98]
Page v
Table of Contents
Preface I: The Basics 1: What Is C++? 3
A Brief History of C++ C++ Organization How to Learn C++
xv 1 3 3 4 6 9 12 13 13 16 32 33 33 35 36 41 42 43 43
2: The Basics of Program Writing
Programs from Conception to Execution Creating a Real Program Creating a Program Using a Command-Line Compiler Creating a Program Using an Integrated Development Environment Getting Help in UNIX Getting Help in an Integrated Development Environment Programming Exercises
3: Style
Comments C++ Code 4 Naming Style Coding Religion Indentation and Code Format
Page vi
Clarity
44
44
Simplicity Consistency