100% found this document useful (15 votes)
1K views

Complete Practical C Programming 2nd Edition Steve Oualline PDF For All Chapters

Programming

Uploaded by

qerobkorosh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (15 votes)
1K views

Complete Practical C Programming 2nd Edition Steve Oualline PDF For All Chapters

Programming

Uploaded by

qerobkorosh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 70

Get ebook downloads in full at ebookname.

com

Practical C Programming 2nd Edition Steve Oualline

https://ebookname.com/product/practical-c-programming-2nd-
edition-steve-oualline/

OR CLICK BUTTON

DOWNLOAD EBOOK

Explore and download more ebook at https://ebookname.com


Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...

Practical UML statecharts in C C event driven


programming for embedded systems 2nd Edition Miro Samek

https://ebookname.com/product/practical-uml-statecharts-in-c-c-
event-driven-programming-for-embedded-systems-2nd-edition-miro-
samek/

Thinking in C Volume 2 Practical Programming Bruce


Eckel

https://ebookname.com/product/thinking-in-c-volume-2-practical-
programming-bruce-eckel/

How Not to Program in C 111 Broken Programs and 3


Working Ones or Why Does 2 2 5986 1st Edition Steve
Oualline

https://ebookname.com/product/how-not-to-program-in-c-111-broken-
programs-and-3-working-ones-or-why-does-2-2-5986-1st-edition-
steve-oualline/

The Image of a Country created by International Media


1st Edition Elena Tarasheva

https://ebookname.com/product/the-image-of-a-country-created-by-
international-media-1st-edition-elena-tarasheva/
Broadbandits Inside the 750 Billion Telecom Heist 1st
Edition Om Malik

https://ebookname.com/product/broadbandits-inside-
the-750-billion-telecom-heist-1st-edition-om-malik/

The Struggle for Democracy 9th Edition Edward S.


Greenberg

https://ebookname.com/product/the-struggle-for-democracy-9th-
edition-edward-s-greenberg/

Canine and Feline Nephrology and Urology Second Edition


Dennis J. Chew Dvm Dacvim

https://ebookname.com/product/canine-and-feline-nephrology-and-
urology-second-edition-dennis-j-chew-dvm-dacvim/

Canadian Painters in a Modern World 1925 1955 Writings


and Reconsiderations 2nd Edition Lora Senechal Carney

https://ebookname.com/product/canadian-painters-in-a-modern-
world-1925-1955-writings-and-reconsiderations-2nd-edition-lora-
senechal-carney/

Nanodevices for the Life Sciences Nanotechnologies for


the Life Sciences Volume 4 1st Edition Challa S. S. R.
Kumar

https://ebookname.com/product/nanodevices-for-the-life-sciences-
nanotechnologies-for-the-life-sciences-volume-4-1st-edition-
challa-s-s-r-kumar/
Earthquake Resistant Design of Buildings 1st Edition
Muhammad Hadi (Author)

https://ebookname.com/product/earthquake-resistant-design-of-
buildings-1st-edition-muhammad-hadi-author/
• Table of C ontents
• Index
• Reviews
• Examples
• Reader Reviews
• Errata

Practical C++ Programming


By Steve Oualline

Publisher : O'Reilly
Pub Date : December 2002
ISBN : 0-596-00419-2
Pages : 574

In short, to-the-point chapters, Practical C++ Programming covers all aspects


of programming including style, software engineering, programming design,
object-oriented design, and debugging. It also covers common mistakes and
how to find (and avoid) them. End of chapter exercises help you ensure you've
mastered the material. Steve Oualline's clear, easy-going writing style and
hands-on approach to learning make Practical C++ Programming a nearly
painless way to master this complex but powerful programming language.
• Table of C ontents
• Index
• Reviews
• Examples
• Reader Reviews
• Errata

Practical C++ Programming


By Steve Oualline

Publisher : O'Reilly
Pub Date : December 2002
ISBN : 0-596-00419-2
Pages : 574

C opyright
Preface
Scope of This Handbook
How This Book Is Organized
How to Read This Book If You Already Know C
Font C onventions
How to C ontact Us
Acknowledgments for the First Edition
Acknowledgments for the Second Edition

Part I: The Basics


C hapter 1. What Is C ++?
Section 1.1. A Brief History of C ++
Section 1.2. C ++ Organization
Section 1.3. How to Learn C ++

C hapter 2. The Basics of Program Writing


Section 2.1. Programs from C onception to Execution
Section 2.2. C reating a Real Program
Section 2.3. Getting Help in Unix
Section 2.4. Getting Help in an IDE
Section 2.5. Programming Exercises

C hapter 3. Style
Section 3.1. C omments

Section 3.2. C ++ C ode


Section 3.3. Naming Style
Section 3.4. C oding Religion
Section 3.5. Indentation and C ode Format
Section 3.6. C larity
Section 3.7. Simplicity
Section 3.8. C onsistency and Organization
Section 3.9. Further Reading
Section 3.10. Summary

C hapter 4. Basic Declarations and Expressions


Section 4.1. Basic Program Structure
Section 4.2. Simple Expressions
Section 4.3. The std::cout Output Object
Section 4.4. Variables and Storage
Section 4.5. Variable Declarations
Section 4.6. Integers
Section 4.7. Assignment Statements
Section 4.8. Floating-Point Numbers
Section 4.9. Floating-Point Divide Versus Integer Divide
Section 4.10. C haracters
Section 4.11. Wide C haracters
Section 4.12. Boolean Type
Section 4.13. Programming Exercises
Section 4.14. Answers to C hapter Questions

C hapter 5. Arrays, Qualifiers, and Reading Numbers


Section 5.1. Arrays
Section 5.2. Strings
Section 5.3. Reading Data
Section 5.4. Initializing Variables
Section 5.5. Multidimensional Arrays
Section 5.6. C -Style Strings
Section 5.7. Types of Integers
Section 5.8. Types of Floats
Section 5.9. C onstant and Reference Declarations
Section 5.10. Qualifiers
Section 5.11. Hexadecimal and Octal C onstants
Section 5.12. Operators for Performing Shortcuts
Section 5.13. Side Effects
Section 5.14. Programming Exercises
Section 5.15. Answers to C hapter Questions

C hapter 6. Decision and C ontrol Statements


Section 6.1. if Statement
Section 6.2. else Statement
Section 6.3. How Not to Use std::strcmp
Section 6.4. Looping Statements
Section 6.5. while Statement
Section 6.6. break Statement

Section 6.7. continue Statement


Section 6.8. The Assignment Anywhere Side Effect
Section 6.9. Programming Exercises
Section 6.10. Answers to C hapter Questions

C hapter 7. The Programming Process


Section 7.1. Setting Up Your Work Area
Section 7.2. The Specification
Section 7.3. C ode Design
Section 7.4. The Prototype
Section 7.5. The Makefile
Section 7.6. Testing
Section 7.7. Debugging
Section 7.8. Maintenance
Section 7.9. Revisions
Section 7.10. Electronic Archaeology
Section 7.11. Mark Up the Program
Section 7.12. Use the Debugger
Section 7.13. Use the Text Editor as a Browser
Section 7.14. Add C omments
Section 7.15. Programming Exercises

Part II: Simple Programming


C hapter 8. More C ontrol Statements
Section 8.1. for Statement
Section 8.2. switch Statement
Section 8.3. switch, break, and continue
Section 8.4. Programming Exercises
Section 8.5. Answers to C hapter Questions

C hapter 9. Variable Scope and Functions


Section 9.1. Scope and Storage C lass
Section 9.2. Namespaces
Section 9.3. Functions
Section 9.4. Summary of Parameter Types
Section 9.5. Recursion
Section 9.6. Structured Programming Basics
Section 9.7. Real-World Programming
Section 9.8. Programming Exercises
Section 9.9. Answers to C hapter Questions

C hapter 10. The C ++ Preprocessor


Section 10.1. #define Statement
Section 10.2. C onditional C ompilation
Section 10.3. #include Files
Section 10.4. Parameterized Macros
Section 10.5. Advanced Features
Section 10.6. Summary
Section 10.7. Programming Exercises

Section 10.8. Answers to C hapter Questions

C hapter 11. Bit Operations


Section 11.1. Bit Operators
Section 11.2. The AND Operator (&)
Section 11.3. Bitwise OR (|)
Section 11.4. The Bitwise Exclusive OR (^)
Section 11.5. The Ones C omplement Operator (NOT) (~)
Section 11.6. The Left and Right Shift Operators (<<, >>)
Section 11.7. Setting, C learing, and Testing Bits
Section 11.8. Bitmapped Graphics
Section 11.9. Programming Exercises
Section 11.10. Answers to C hapter Questions

Part III: Advanced Types and C lasses


C hapter 12. Advanced Types
Section 12.1. Structures
Section 12.2. Unions
Section 12.3. typedef
Section 12.4. enum Type
Section 12.5. Bit Members or Packed Structures
Section 12.6. Arrays of Structures
Section 12.7. Programming Exercises
Section 12.8. Answers to C hapter Questions

C hapter 13. Simple C lasses


Section 13.1. Stacks
Section 13.2. Improved Stack
Section 13.3. Using a C lass
Section 13.4. Introduction to C onstructors and Destructors
Section 13.5. Automatically Generated Member Functions
Section 13.6. Shortcuts
Section 13.7. Style
Section 13.8. Structures Versus C lasses
Section 13.9. Programming Exercises

C hapter 14. More on C lasses


Section 14.1. Friends
Section 14.2. C onstant Functions
Section 14.3. C onstant Members
Section 14.4. Static Member Variables
Section 14.5. Static Member Functions
Section 14.6. The Meaning of static
Section 14.7. Programming Exercises

C hapter 15. Simple Pointers


Section 15.1. const Pointers
Section 15.2. Pointers and Printing
Section 15.3. Pointers and Arrays

Section 15.4. The reinterpret_cast

Section 15.5. Pointers and Structures

Section 15.6. C ommand-Line Arguments


Section 15.7. Programming Exercises
Section 15.8. Answers to C hapter Questions

Part IV: Advanced Programming C oncepts


C hapter 16. File Input/Output
Section 16.1. C ++ File I/O
Section 16.2. C onversion Routines
Section 16.3. Binary and ASC II Files
Section 16.4. The End-of-Line Puzzle
Section 16.5. Binary I/O
Section 16.6. Buffering Problems
Section 16.7. Unbuffered I/O
Section 16.8. Designing File Formats
Section 16.9. C -Style I/O Routines
Section 16.10. C -Style C onversion Routines
Section 16.11. C -Style Binary I/O
Section 16.12. C - Versus C ++- Style I/O
Section 16.13. Programming Exercises
Section 16.14. Answers to C hapter Questions

C hapter 17. Debugging and Optimization


Section 17.1. C ode Reviews
Section 17.2. Serial Debugging
Section 17.3. Going Through the Output
Section 17.4. Interactive Debuggers
Section 17.5. Debugging a Binary Search
Section 17.6. Interactive Debugging Tips and Tricks
Section 17.7. Runtime Errors
Section 17.8. Optimization
Section 17.9. How to Optimize
Section 17.10. C ase Study: Inline Functions Versus Normal Functions
Section 17.11. C ase Study: Optimizing a C olor-Rendering Algorithm
Section 17.12. Programming Exercises
Section 17.13. Answers to C hapter Questions

C hapter 18. Operator Overloading


Section 18.1. C reating a Simple Fixed-Point C lass
Section 18.2. Operator Functions
Section 18.3. Operator Member Functions
Section 18.4. Warts
Section 18.5. Full Definition of the Fixed-Point C lass
Section 18.6. Programming Exercises
Section 18.7. Answers to C hapter Questions
C hapter 19. Floating Point

Section 19.1. Floating-Point Format

Section 19.2. Floating Addition/Subtraction


Section 19.3. Multiplication and Division
Section 19.4. Overflow and Underflow
Section 19.5. Roundoff Error
Section 19.6. Accuracy
Section 19.7. Minimizing Roundoff Error
Section 19.8. Determining Accuracy
Section 19.9. Precision and Speed
Section 19.10. Power Series
Section 19.11. Programming Exercises

C hapter 20. Advanced Pointers


Section 20.1. Pointers, Structures, and C lasses
Section 20.2. delete Operator
Section 20.3. Linked Lists
Section 20.4. Ordered Linked Lists
Section 20.5. Doubly Linked Lists
Section 20.6. Trees
Section 20.7. Printing a Tree
Section 20.8. The Rest of the Program
Section 20.9. Data Structures for a C hess Program
Section 20.10. Programming Exercises
Section 20.11. Answers to C hapter Questions

C hapter 21. Advanced C lasses


Section 21.1. Derived C lasses
Section 21.2. Virtual Functions
Section 21.3. Virtual C lasses
Section 21.4. Function Hiding in Derived C lasses
Section 21.5. C onstructors and Destructors in Derived C lasses
Section 21.6. The dynamic_cast Operator
Section 21.7. Summary
Section 21.8. Programming Exercises
Section 21.9. Answers to C hapter Questions

Part V: Other Language Features


C hapter 22. Exceptions
Section 22.1. Adding Exceptions to the Stack C lass
Section 22.2. Exceptions Versus assert
Section 22.3. Programming Exercises

C hapter 23. Modular Programming


Section 23.1. Modules
Section 23.2. Public and Private
Section 23.3. The extern Storage C lass
Section 23.4. Headers
Section 23.5. The Body of the Module

Section 23.6. A Program to Use Infinite Arrays

Section 23.7. The Makefile for Multiple Files

Section 23.8. Using the Infinite Array


Section 23.9. Dividing a Task into Modules

Section 23.10. Module Design Guidelines

Section 23.11. Programming Exercises

C hapter 24. Templates


Section 24.1. What Is a Template?
Section 24.2. Templates: The Hard Way
Section 24.3. Templates: The C ++ Way
Section 24.4. Function Specialization
Section 24.5. C lass Templates
Section 24.6. C lass Specialization
Section 24.7. Implementation Details
Section 24.8. Advanced Features
Section 24.9. Summary
Section 24.10. Programming Exercises

C hapter 25. Standard Template Library


Section 25.1. STL Basics
Section 25.2. C lass List�A Set of Students
Section 25.3. C reating a Waiting List with the STL List
Section 25.4. Storing Grades in a STL Map
Section 25.5. Putting It All Together
Section 25.6. Practical C onsiderations When Using the STL
Section 25.7. Getting More Information
Section 25.8. Exercises

C hapter 26. Program Design


Section 26.1. Design Goals
Section 26.2. Design Factors
Section 26.3. Design Principles
Section 26.4. C oding
Section 26.5. Objects
Section 26.6. Real-World Design Techniques
Section 26.7. C onclusion

C hapter 27. Putting It All Together


Section 27.1. Requirements
Section 27.2. C ode Design
Section 27.3. C oding
Section 27.4. Functional Description
Section 27.5. Testing
Section 27.6. Revisions
Section 27.7. A Final Warning
Section 27.8. Program Files

Section 27.9. Programming Exercises

C hapter 28. From C to C ++


Section 28.1. K&R-Style Functions
Section 28.2. struct

Section 28.3. malloc and free


Section 28.4. Turning Structures into C lasses
Section 28.5. setjmp and longjmp
Section 28.6. Mixing C and C ++ C ode

Section 28.7. Summary


Section 28.8. Programming Exercise

C hapter 29. C ++'s Dustier C orners


Section 29.1. do/while
Section 29.2. goto
Section 29.3. The ?: C onstruct
Section 29.4. The C omma Operator
Section 29.5. Overloading the ( ) Operator
Section 29.6. Pointers to Members
Section 29.7. The asm Statement
Section 29.8. The mutable Qualifier
Section 29.9. Run Time Type Identification
Section 29.10. Trigraphs
Section 29.11. Answers to C hapter Questions

C hapter 30. Programming Adages


Section 30.1. General
Section 30.2. Design
Section 30.3. Declarations
Section 30.4. switch Statement
Section 30.5. Preprocessor
Section 30.6. Style
Section 30.7. C ompiling
Section 30.8. The Ten C ommandments for C ++ Programmers
Section 30.9. Final Note
Section 30.10. Answers to C hapter Questions

Part VI: Appendixes


Appendix A. ASC II Table
Appendix B. Ranges
Appendix C . Operator Precedence Rules
Section C .1. Standard Rules
Section C .2. Practical Subset of the Operator Precedence Rules

Appendix D. C omputing Sine Using a Power Series


Appendix E. Resources
Section E.1. C ompilers
Section E.2. Standard Template Library

Section E.3. Standards

Section E.4. Programming Tools

C olophon
Index
Copyright
Copyright © 2003, 1995 O'Reilly & Associates, Inc.

Printed in the United States of America.

Published by O'Reilly & Associates, Inc., 1005 Gravenstein Highway North,


Sebastopol, CA 95472.

O'Reilly & Associates books may be purchased for educational, business, or


sales promotional use. Online editions are also available for most titles
(http://safari.oreilly.com). For more information, contact our
corporate/institutional sales department: (800) 998-9938 or
corporate@oreilly.com.

Nutshell Handbook, the Nutshell Handbook logo, and the O'Reilly logo are
registered trademarks 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. The association between the image of an Eastern
chipmunk and the topic of C++ programming is a trademark of O'Reilly &
Associates, Inc.

While every precaution has been taken in the preparation of this book, the
publisher and authors assume no responsibility for errors or omissions, or for
damages resulting from the use of the information contained herein.
Preface
This book is devoted to practical C++ programming. It teaches you not only
the mechanics of the language, but also style and debugging. The entire life
cycle of a program is discussed, including conception, design, writing,
debugging, release, documentation, maintenance, and revision.

Style is emphasized. Creating a good program involves more than just typing
code. It is an art in which writing and programming skills blend to form a
masterpiece. A well-written program not only functions correctly, but also is
simple and easy to understand. Comments allow programmers to include
descriptive text in their programs. Clearly written, well-commented programs
are highly prized.

A program should be as simple as possible. Avoid the use of clever tricks.


Cleverness and complexity can kill programs. This book stresses simple,
practical rules. For example, the 15 operator-precedence rules in C++ can be
simplified to 2:

1. Multiply and divide before you add and subtract.

Put parentheses around everything else.

Consider two programs. One was written by a clever programmer, using all the
tricks. The program contains no comments, but it works. The other is nicely
commented and well structured, but doesn't work. Which program is more
useful? In the long run, the "broken" one is more useful because it can be
fixed and maintained easily. Although the clever one works now, sooner or
later it will have to be modified. The hardest work you will ever have to do is
modifying a cleverly written program.
Scope of This Handbook

This handbook is written for people with no previous programming experience,


for programmers who know C and want to upgrade their skills to C++, and for
those who already know C++ and want to improve their programming style
and reliability. You should have access to a computer and know how to use the
basic functions such as the text editor and file system.

Computer languages are best learned by writing and debugging programs.


Sweating over a broken program at two o'clock in the morning only to find
that you typed = where you should have typed == is a very effective teaching
tool. This book contains many examples of common programming errors.
(They are labeled as broken programs in the text.) You are encouraged to
enter these programs into your computer and then run and debug them. This
process introduces you to common errors using short programs so you will
know how to spot and correct such errors in your own larger programs.
(Instructions for obtaining copies of the programs presented in this book are
located at the end of this preface.)

Several dialects of C++ are presented:

A "generic" Unix compiler that should work on most Unix systems

The GNU C++ compiler, named g++ (available for most Unix systems[1])

[1]The GNU g++ compiler can be obtained from http://www.gnu.org,


or you can contact the Free Software Foundation, Inc., at 675
Massachusetts Avenue, Cambridge, MA 02139, (617) 876-3296.

Borland C++ for MS-DOS/Windows

Microsoft's Visual C++ for MS-DOS/Windows

As far as standard C++ is concerned, there are only minor differences among
the various compilers. This book clearly indicates where compiler differences
can affect the programmer. Specific instructions are given for producing and
running programs using each of these compilers. The book also gives examples
of using the programming utility make for automated program production.
How This Book Is Organized

You must crawl before you walk. In Part I, you learn how to crawl. These
chapters teach you enough to write very simple programs. You start with the
mechanics of programming and programming style. Next, you learn how to use
variables and very simple decision and control statements.

At this point you will have learned enough to create very simple programs;
therefore, in Chapter 7, you embark on a complete tour of the programming
process that shows you how real programs are created.

Chapter 1 gives you an overview of C++, describes its history and uses,
and explains how the language is organized.

Chapter 2 explains the basic programming process and gives you enough
information to write a very simple program.

Chapter 3 discusses programming style. How to comment a program is


covered, as well as how to write clear and simple code.

Chapter 4 introduces simple C++ statements. Basic variables and the


assignment statement are covered in detail along with the arithmetic
operators: +, -, *, /, and %.

Chapter 5 covers arrays and more complex variables. The shorthand


operators ++, -- , *=, =, +=, -=, /=, and %= are described.

Chapter 6 explains simple decision statements including if, else, and for.
The problem of == versus = is discussed.

Chapter 7 takes you through the steps required for creating a simple
program, from specification through release. Fast prototyping and
debugging are discussed.

Part II describes all the other simple statements and operators that are used in
programming. You also learn how to organize these statements into simple
functions.

Chapter 8 describes additional control statements. Included are while,


break, and continue. The switch statement is discussed in detail.

Chapter 9 introduces local variables, namespaces, functions, and


parameters.

Chapter 10 describes the C++ preprocessor, which gives you great


flexibility in creating code. It also provides a tremendous number of ways
for you to screw up. Simple rules that help keep the preprocessor from
becoming a problem are described.

Chapter 11 discusses the logical C++ operators that work on bits.

In Part III you learn how basic declarations and statements can be used in the
construction of advanced types such as structures, unions, and classes. You
also learn about the concept of pointers.

Chapter 12 explains structures and other advanced types. The sizeof


operator and the enum type are included.

Chapter 13 introduces the concept of a class. This is one of the more


powerful features of C++. Classes allow you to group data and the
operations that can be performed on that data into one object.

Chapter 14 describes additional operations that can be performed with


classes.

Chapter 15 introduces C++ pointer variables and shows some of their


uses.

Advanced programming techniques are explored in Part IV. In this section, you
explore a number of C++ features that let you create complex, yet easy-to-
use objects or classes.

Chapter 16 describes both buffered and unbuffered input/output (I/O).


ASCII and binary files are discussed and you are shown how to construct a
simple file. Old C-style I/O operations are also included.

Chapter 17 describes how to debug a program and how to use an


interactive debugger. You are shown not only how to debug a program, but
also how to write a program so that it is easy to debug. This chapter also
describes many optimization techniques to make your programs run faster
and more efficiently.

Chapter 18 explains that C++ allows you to extend the language by


defining additional meanings for the language's operators. In this chapter,
you create a complex type and the operators that work on it.

Chapter 19 uses a simple decimal floating-point format to introduce the


problems inherent in using floating points, such as roundoff errors,
precision loss, overflow, and underflow.

Chapter 20 describes advanced use of pointers to construct dynamic


structures such as linked lists and trees.

Chapter 21 shows how to build complex, derived classes out of simple,


base ones.

Several miscellaneous features are described in Part V.

Chapter 22 explains how to handle unexpected conditions within a


program.

Chapter 23 shows how to split a program into several files and use
modular programming techniques. The make utility is explained in more
detail.

Chapter 24 allows you to define a generic function or class that generates


a family of functions.

Chapter 25 describes the template library that comes with C++. This
library consists of a number of "container templates" and related data
structures which let you create very complex and robust data structures
with very little work.

Chapter 26 discusses some of the methodologies used to design programs,


such as structured programming and object-oriented design. Not only are
the design methods discussed, but also the reasoning that went into the
design of the program.

Chapter 27 details the steps necessary to take a complex program from


conception to completion. Information hiding and modular programming
techniques, as well as object-oriented programming, are stressed.

Chapter 28 describes how to turn C code into C++ code and addresses
many of the traps lurking in C code that bite the C++ programmer.

Chapter 29 describes the little used do/while statement, the comma


operator, and the ?: operators.

Chapter 30 lists programming adages that will help you construct good
C++ programs.

Part VI contains additional C++ reference information.

Appendix A contains a list of character codes and their values.

Appendix B lists the numeric ranges of some C++ variable types.

Appendix C lists the rules that determine the order in which operators are
evaluated.

Appendix D contains a program that shows how the computer can compute
the value of the sine function.

Appendix E lists information on the programming resources mentioned in


the book.
How to Read This Book If You Already Know C

C++ is built on the C language. If you know C, you will find much of the
material presented in Chapter 2 through Chapter 12 familiar.

C++ does introduce a number of new minor improvements to C++, including:

An entirely new I/O system. (The basics are described in Chapter 4. The
new file system is discussed in detail in Chapter 16.)

Constants and reference variables (described in Chapter 5).

Function overloading, inline functions, reference parameters, and default


parameters. (Read Chapter 9.)

So you can use C++ as a better C. But C++ has added some entirely new
features such as objects, templates, and exceptions. So starting with Chapter
13, you will begin to learn entirely new concepts.
Font Conventions

The following conventions are used in this book:

Italic

Used for directories and to emphasize new terms and concepts when they
are introduced. Italic is also used to highlight comments in examples.

Bold

Used for C++ keywords.

Constant width

Used for programs and the elements of a program and in examples to show
the contents of files or the output from commands. A reference in text to a
word or item used in an example or code fragment is also shown in
constant width font.

Constant bold

Used in examples to show commands or other text that should be typed


literally by the user. (For example, rm foo means to type "rm foo" exactly
as it appears in the text or the example.)

Constant italic

Used in examples to show variables for which a context-specific


substitution should be made. (The variable filename, for example, would
be replaced by some actual filename.)

"Quotes"

Used to identify system messages or code fragments in explanatory text.

The Unix C shell prompt.

The Unix Bourne shell or Korn shell prompt.


[]

Surround optional values in a description of program syntax. (The brackets


themselves should never be typed.)

...

Stands for text (usually computer output) that's been omitted for clarity or
to save space.

The notation CTRL-X or ^X indicates use of control characters. It means hold


down the "control" key while typing the character "x". We denote other keys
similarly (e.g., RETURN indicates a carriage return).

All examples of command lines are followed by a RETURN unless otherwise


indicated.
How to Contact Us

Please address comments and questions concerning this book to:

O'Reilly & Associates, Inc.


1005 Gravenstein Highway North
Sebastopol, CA 95472
1-800-998-9938 (in the United States or Canada)
1-707-829-0515 (international or local)
1-707-829-0104 (fax)

There is a web page for this book, which lists errata, examples, or any
additional information. You can access this page at:

http://www.oreilly.com/catalog/cplus2

To comment or ask technical questions about this book, send email to:

bookquestions@oreilly.com

For more information about books, conferences, Resource Centers, and the
O'Reilly Network, see the O'Reilly web site at:

http://www.oreilly.com/
Acknowledgments for the First Edition

Thanks to Peg Kovar for her proofreading and editing help. Special thanks to
Dale Dougherty for ripping apart my first book and forcing me to put it
together correctly. I greatly appreciate the hard work put in by Phil Straite and
Gregory Satir. I especially thank all those people who reviewed and edited my
book. My thanks also go to the production group at O'Reilly & Associates​Nicole
Gipson, project manager and production editor; John Files, Juliette Muellner,
and Jane Ellin, production assistants; and Mike Sierra, book design
implementor. Finally, special thanks go to all the hard-working programmers
out there whose code has taught me so much.
Acknowledgments for the Second Edition

For the second edition I wish to thank my editor, Robert J. Denn, for his
patience and hard work in getting the book done. Thanks to Ray Lischner for
his technical insight. Al Stevens deserves special recognition for his extensive
knowledge of C++ and his exacting standards. His efforts helped me to tighten
the terminology and refine the examples in the book, resulting in a much more
precise manuscript. Any errors in this book are my own and are not the fault
of the reviewers or of the staff at O'Reilly.

Also I wish to give credit to all the sales and marketing people at O'Reilly who
work so hard to sell my book.
Part I: The Basics
Chapter 1

Chapter 2

Chapter 3

Chapter 4

Chapter 5

Chapter 6

Chapter 7
Chapter 1. What Is C++?

Profanity is the one language that all programmers understand.

​Anonymous

The ability to organize and process information is the key to success in the
modern age. Computers are designed to handle and process large amounts of
information quickly and efficiently. However, they can't do anything until
someone tells them what to do. That's where C++ comes in. C++ is a high-
level programming language that allows a software engineer to efficiently
communicate with a computer.

C++ is a highly flexible and adaptable language. Since its creation in 1980, it
has been used for a wide variety of programs including firmware for
microcontrollers, operating systems, applications, and graphics programming.
C++ is the programming language of choice for a tremendous number of
applications. There is a tremendous demand for people who can tell computers
what to do, and C++ lets you do so quickly and efficiently.
1.1 A Brief History of C++

In 1970 two programmers, Brian Kernighan and Dennis Ritchie, created a new
language called C. (The name came about because C was preceded by the old
programming language they were using called B.) C was designed with one
goal in mind: writing operating systems. The language was extremely simple
and flexible and soon was used for many different types of programs. It quickly
became one of the most popular programming languages in the world.

C had one major problem, however. It was a procedure-oriented language. This


meant that in designing a typical C program, the programmer would start by
describing the data and then write procedures to manipulate that data.

Programmers eventually discovered that it made a program clearer and easier


to understand if they were able to take a bunch of data and group it together
with the operations that worked on that data. Such a grouping is called an
object or class. Designing programs by designing classes is known as object-
oriented design (OOD).

In 1980 Bjarne Stroustrup started working on a new language, called "C with
Classes." This language improved on C by adding a number of new features,
the most important of which was classes. This language was improved,
augmented, and finally became C++.

C++ owes its success to the fact that it allows the programmer to organize and
process information more effectively than most other languages. Also, it builds
on the work already done with the C language. In fact, most C programs can
be transformed into C++ programs with little trouble. These programs usually
don't use all the new features of C++, but they do work. In this way, C++
allows programmers to build on an existing base of C code.
1.2 C++ Organization

C++ is designed as a bridge between the programmer and the raw computer.
The idea is to let the programmer organize a program in a way that he can
easily understand. The compiler then translates the language into something
the machine can use.

Computer programs consist of two main parts: data and instructions. The
computer imposes little or no organization on these two parts. After all,
computers are designed to be as general as possible. The idea is for the
programmer to impose his or her own organization on the computer and not
the other way around.

The data in a computer is stored as a series of bytes. C++ organizes those


bytes into useful data. Data declarations are used by the programmer to
describe the information he or she is working with. For example:

int total; // Total number accounts

tells C++ that you want to use a section of the computer's memory to store an
integer named total. You can let the compiler decide what particular bytes of
memory to use; that's a minor bookkeeping detail you don't need to worry
about.

The variable total is a simple variable . It can hold only one integer and
describe only one total. A series of integers can be organized into an array.
Again, C++ will handle the details, imposing that organization on the
computer's memory.

int balance[100]; // Balance (in cents) for all 100 acco

Finally, there are more complex data types. For example, a rectangle might
have a width, a height, a color, and a fill pattern. C++ lets you organize these
four attributes into one group called a structure.

struct rectangle {
int width; // Width of rectangle in p
int height; // Height of rectangle in
color_type color; // Color of the rectangle
fill_type fill; // Fill pattern
};
However, data is only one part of a program; you also need instructions. As far
as the computer is concerned, it knows nothing about the layout of the
instructions. It knows only what it's doing for the current instruction and
where to get the next instruction.

C++ is a high-level language. It lets you write a high-level statement such as:

area = (base * height) / 2.0; // Compute area of tri

The compiler translates this statement into a series of cryptic machine


instructions. This sort of statement is called an assignment statement. It is
used to compute and store the value of an arithmetic expression.

You can also use control statements to control the order of processing.
Statements such as the if and switch statements enable the computer to
make simple decisions. Statements can be repeated by using looping
statements such as while and for.

Groups of statements can be wrapped to form functions. Thus you only need to
write a general-purpose function to draw a rectangle once, and you can reuse
that function whenever you want to draw a new rectangle. C++ provides a rich
set of standard functions that perform common functions such as searching,
sorting, input, and output. A set of related functions can be grouped together
to form a module, and modules are linked to form programs.

One of the major goals of the C++ language is to organize instructions into
reusable components. After all, you can write programs much faster if you
"borrow" most of your code from somewhere else. Groups of reusable modules
can be combined into a library. For example, if you need a sort routine, you
can use the standard function qsort from the library and link it into your
program.

A computer divides the world into data and instructions. For a long time, high-
level languages such as C kept that dividing line in place. In C you can define
data or write instructions, but you can't combine the two.

One of C++'s major innovations is the idea of combining data and instructions
together in a construct called a class or object. Object-oriented programming
allows you to group data with the operations that can be performed on that
data. This concept is taken a step further in C++ by letting you derive new
classes from existing ones.

This last feature is extremely powerful. It allows you to build complex classes
on top of smaller, simpler ones. It also allows you to define a basic, abstract
class and then derive specific classes from it. For example, an abstract class of
shape might be used to define the shapes rectangle, triangle, and
circle.

Organization is the key to writing good programs. In this book, you know that
the table of contents is in the front and the index is in the back, because that's
the way books are organized. Organization makes this book easier to use.

The C++ language lets you organize your programs using a simple yet
powerful syntax. This book goes beyond the C++ syntax and teaches you style
rules that enable you to create highly readable and reliable programs. By
combining a powerful syntax with good programming style, you can create
powerful programs that perform complex and wonderful operations.
1.3 How to Learn C++

The only way to learn how to program is to write programs. You'll learn a lot
more by writing and debugging programs than you ever will by reading this
book. This book contains many programming exercises, and you should try to
do as many of them as possible. When doing the exercises, keep good
programming style in mind. Always comment your programs, even if you're
doing the exercises only for yourself. Commenting helps you organize your
thoughts, and commenting your own programs is good practice for when you
go into the "real world."

Don't let yourself be seduced by the idea that, "I'm only writing these
programs for myself, so I don't need to comment them." First of all, code that
looks obvious to you when you write it can often be confusing and cryptic
when you revisit it a week later. Writing comments also helps you organize
your ideas. (If you can write out an idea in English, you are halfway to writing
it in C++.)

Finally, programs tend to be around far longer than expected. I once wrote a
highly system-dependent program that was designed to work only on the
computer at Caltech. As I was the only one who would ever use the program,
it would print the following message if I got the command line wrong:

?LSTUIT User is a twit

A few years later I was a student at Syracuse University. The chief secretary at
the School of Computer Science needed a program similar to my Caltech
listing program, so I adapted my program for her use. Unfortunately, I had
forgotten about my funny little error message.

Imagine how horrified I was when I came into the Computer Science office and
was accosted by the chief secretary. This lady had so much power she could
make the dean cringe. She looked at me and said, "User is a twit, huh?"
Luckily she had a sense of humor, or I might not be here today.

Sprinkled throughout are not only examples of working programs (to show you
how to do things), but also examples of broken programs where we ask you to
go through the program and figure out what's wrong. Often the problem is
very subtle, such as a misplaced semicolon or use of = instead of ==. These
programs let you learn how to spot mistakes in a small program. That way
when you make similar mistakes in a big program​and you will make
mistakes​you will be trained to spot them.
Another Random Document on
Scribd Without Any Related Topics
CHAP. III.
Truth. In the answer, Mr. Cotton first lays down several distinctions
and conclusions of his own, tending to prove persecution.
Secondly. Answers to the scriptures and arguments proposed
against persecution.
Peace. The first distinction is this: by persecution The first
for cause of conscience, “I conceive you mean distinction
either for professing some point of doctrine which discussed.
you believe in conscience to be the truth, or for practising some
work which you believe in conscience to be a religious duty.”
Truth. I acknowledge that to molest any person, Definition of
Jew or Gentile, for either professing doctrine, or persecution
practising worship merely religious or spiritual, it is discussed.
to persecute him; and such a person, whatever his doctrine or
practice be, true or false, suffereth persecution for conscience.
But withal I desire it may be well observed, that Conscience will
this distinction is not full and complete. For beside not be restrained
this, that a man may be persecuted because he from its own
worship, nor
holdeth or practiseth what he believes in constrained to
conscience to be a truth, as Daniel did, for which another.
he was cast into the lions’ den, Dan. vi. 16, and
many thousands of Christians, because they durst not cease to
preach and practise what they believed was by God commanded, as
the apostles answered, Acts iv. and v., I say, besides this, a man may
also be persecuted because he dares not be constrained to yield
obedience to such doctrines and worships as are by men invented
and appointed. So the three famous Jews, who were cast into the
fiery furnace for refusing to fall down, in a nonconformity to the
whole conforming world, before the golden image, Dan. iii. 21.[96]
So thousands of Christ’s witnesses, and of late in those bloody
Marian days, have rather chosen to yield their bodies to all sorts of
torments, than to subscribe to doctrines, or practise worships, unto
which the states and times (as Nebuchadnezzar to his golden image)
have compelled and urged them.
A chaste wife will not only abhor to be restrained A chaste soul in
from her husband’s bed as adulterous and polluted, God’s worship,
but also abhor (if not much more) to be like a chaste wife.
constrained to the bed of a stranger. And what is abominable in
corporal, is much more loathsome in spiritual whoredom and
defilement.
The spouse of Christ Jesus, who could not find her soul’s beloved
in the ways of his worship and ministry, Cant. i., iii., and v. chapters,
abhorred to turn aside to other flocks, worships, &c., and to embrace
the bosom of a false Christ, Cant. i. 8.
CHAP. IV.
Peace. The second distinction is this:—
“In points of doctrine some are fundamental, The second
without right belief whereof a man cannot be distinction
saved; others are circumstantial and less principal, discussed.
wherein a man may differ in judgment without prejudice of salvation
on either part.”
Truth. To this distinction I dare not subscribe, for God’s people may
then I should everlastingly condemn thousands, err from the very
and ten thousands, yea, the whole generation of fundamentals of
visible worship.
the righteous, who since the falling away from the
first primitive Christian state or worship, have and do err
fundamentally concerning the true matter, constitution, gathering,
and governing of the church. And yet, far be it from any pious breast
to imagine that they are not saved, and that their souls are not
bound up in the bundle of eternal life.[97]
We read of four sorts of spiritual, or Christian, foundations in the
New Testament.
First, the foundation of all foundations, the Four sorts of
corner-stone itself, the Lord Jesus, on whom all spiritual
foundations.
depend—persons, doctrines, practices, 1 Cor. iii.
[11.]
2. Ministerial foundations. The church is built upon the foundation
of the apostles and prophets, Ephes. ii. 20.
3. The foundation of future rejoicing in the fruits of obedience, 1
Tim. vi. [19.]
4. The foundation of doctrines, without the Στοιχεῖα, θεμὲιοὶ.
knowledge of which there can be no true The six
foundations of the
profession of Christ, according to the first
institution, Heb. vi. [1, 2,]—the foundation, or
principles, of repentance from dead works, faith Christian religion
or worship.
towards God, the doctrine of baptisms, laying on of
hands, the resurrection, and eternal judgment. In some of these, to
wit, those concerning baptisms and laying on of hands, God’s people
will be found to be ignorant for many hundred years; and I yet
cannot see it proved that light is risen, I mean the light of the first
institution, in practice.
God’s people in their persons, heart-waking (Cant. v. 2), in the life
of personal grace, will yet be found fast asleep in respect of public
Christian worship.
God’s people, in their persons, are His, most Coming out of
dear and precious: yet in respect of the Christian Babel, not local,
worship they are mingled amongst the but mystical.
Babylonians, from whence they are called to come out, not locally,
as some have said, for that belonged to a material and local Babel
(and literal Babel and Jerusalem have now no difference, John iv.
21), but spiritually and mystically to come out from her sins and
abominations.
If Mr. Cotton maintain the true church of Christ The great
to consist of the true matter of holy persons called ignorance of
out from the world (and the true form of union in a God’s people
concerning the
church government), and that also neither national, nature of the true
provincial, nor diocesan churches are of Christ’s church.
institution: how many thousands of God’s people of
all sorts, clergy and laity, as they call them, will they find, both in
former and later times, captivated in such national, provincial, and
diocesan churches? yea, and so far from living in, yea or knowing of
any such churches, for matter and form, as they conceive now only
to be true, that until of late years, how few of God’s people knew
any other church than the parish church of dead stones or timber? It
being a late marvellous light, revealed by Christ Jesus, the Sun of
righteousness, that his people are a company or church of living
stones, 1 Pet. ii. 9.
And, however his own soul, and the souls of Mr. Cotton and all
many others, precious to God, are persuaded to the half
separate from national, provincial, and diocesan separatists,
halting between
churches, and to assemble into particular churches, true and false
yet, since there are no parish churches in England, churches, and
but what are made up of the parish bounds within consequently not
yet clear in the
such and such a compass of houses, and that such fundamental
churches have been and are in constant matter of a
dependence on, and subordination to the national Christian church.
church: how can the New English particular churches join with the
old English parish churches in so many ordinances of word, prayer,
singing, contribution, &c., but they must needs confess, that as yet
their souls are far from the knowledge of the foundation of a true
Christian church, whose matter must not only be living stones, but
also separated from the rubbish of anti-christian confusions and
desolations.
CHAP. V.
Peace. With lamentation, I may add, how can their souls be clear
in this foundation of the true Christian matter, who persecute and
oppress their own acknowledged brethren, presenting light unto
them about this point? But I shall now present you with Mr. Cotton’s
third distinction. “In points of practice,” saith he, “some concern the
weightier duties of the law, as what God we worship, and with what
kind of worship; whether such, as if it be right, fellowship with God
is held; if false, fellowship with God is lost.”
Truth. It is worth the inquiry, what kind of worship he intendeth:
for worship is of various signification. Whether in general acceptation
he mean the rightness or corruptness of the church, or the ministry
of the church, or the ministrations of the word, prayer, seals, &c.
And because it pleaseth the Spirit of God to The true ministry
make the ministry one of the foundations of the a fundamental.
Christian religion, Heb. vi. 1, 2, and also to make
the ministry of the word and prayer in the church to be two special
works, even of the apostles themselves, Acts vi. 2, I shall desire it
may be well considered in the fear of God.[98]
First, concerning the ministry of the word. The The New English
New English ministers, when they were new ministers
elected and ordained ministers in New England, examined.
must undeniably grant, that at that time they were no ministers,
notwithstanding their profession of standing so long in a true
ministry in old England, whether received from the bishops, which
some have maintained true, or from the people, which Mr. Cotton
and others better liked, and which ministry was always accounted
perpetual and indelible. I apply, and ask, will it not follow, that if
their new ministry and ordination be true, the former was false? and
if false, that in the exercise of it, notwithstanding abilities, graces,
intentions, labours, and, by God’s gracious, unpromised, and
extraordinary blessing, some success, I say, will it not according to
this distinction follow, that according to visible rule, fellowship with
God was lost?
Secondly, concerning prayer. The New English Common prayer
ministers have disclaimed and written against that cast off, and
worshipping of God by the common or set forms of written against by
the New English.
prayer, which yet themselves practised in England,
notwithstanding they knew that many servants of God, in great
sufferings, witnessed against such a ministry of the word, and such
a ministry of prayer.
Peace. I could name the persons, time, and place, when some of
them were faithfully admonished for using of the Common Prayer,
and the arguments presented to them, then seeming weak, but now
acknowledged sound; yet, at that time, they satisfied their hearts
with the practice of the author of the Council of Trent, who used to
read only some of the choicest selected prayers in the mass-book,
which I confess was also their own practice in their using of the
Common Prayer.[99] But now, according to this distinction, I ask
whether or no fellowship with God in such prayers was lost?
Truth. I could particularize other exercises of God’s people have
worship, which cannot be denied, according to this worshipped God
distinction, to be of the weightier points of the law: with false
worships.
to wit, what God we worship, and with what kind
of worship? wherein fellowship with God, in many of our unclean
and abominable worships, hath been lost. Only upon these premises
I shall observe: first, that God’s people, even the standard-bearers
and leaders of them, according to this distinction, have worshipped
God, in their sleepy ignorance, by such a kind of worship as wherein
fellowship with God is lost; yea also, that it is possible for them to
do, after much light is risen against such worship, and in particular,
brought to the eyes of such holy and worthy persons.
Secondly, there may be inward and secret fellowship with God in
false ministries of word and prayer, (for that to the eternal praise of
infinite mercy, beyond a word or promise of God, I
acknowledge[100]) when yet, as the distinction saith, in such
worship, not being right, fellowship with God is lost, and such a
service or ministration must be lamented and forsaken.
Thirdly, I observe that God’s people may live and Fundamentals of
die in such kinds of worship, notwithstanding that Christian worship
light from God, publicly and privately, hath been not so easy and
clear.
presented to them, able to convince; yet, not
reaching to their conviction, and forsaking of such ways, contrary to
a conclusion afterward expressed; to wit, “that fundamentals are so
clear, that a man cannot but be convinced in conscience, and
therefore that such a person not being convinced, he is condemned
of himself, and may be persecuted for sinning against his
conscience.”
Fourthly, I observe, that in such a maintaining a clearness of
fundamentals or weightier points, and upon that ground a
persecuting of men because they sin against their consciences, Mr.
Cotton measures that to others, which himself when he lived in such
practices would not have had measured to himself. As first, that it
might have been affirmed of him, that in such practices he did sin
against his conscience, having sufficient light shining about him.
Secondly, that he should or might lawfully have been cut off by
death or banishment, as an heretic, sinning against his own
conscience.
And in this respect the speech of king James was A notable speech
notable to a great nonconformitant, converted, as of king James to a
is said, by king James to conformity, and great nonconformist,
counselling the king afterward to persecute the turned persecutor.
nonconformists even unto death: “Thou beast,”
quoth the king, “if I had dealt so with thee in thy nonconformity,
where hadst thou been?”
CHAP. VI.
Peace. The next distinction concerneth the The four
manner of persons holding forth the aforesaid distinctions
discussed.
practices, not only the weightier duties of the law,
but points of doctrine and worship less principal:—
“Some,” saith he, “hold them forth in a meek and peaceable way;
some with such arrogance and impetuousness, as of itself tendeth to
the disturbance of civil peace.”
Truth. In the examination of this distinction we shall discuss,
First, what is civil peace (wherein we shall vindicate thy name the
better),
Secondly, what it is to hold forth a doctrine, or practice, in this
impetuousness or arrogancy.
First, for civil peace, what is it but pax civitatis, What civil peace
the peace of the city, whether an English city, is.
Scotch, or Irish city, or further abroad, French,
Spanish, Turkish city, &c.
Thus it pleased the Father of lights to define it, God’s people must
Jer. xxix. 7, Pray for the peace of the city; which be
peace of the city, or citizens, so compacted in a nonconformitants
to evil.
civil way of union, may be entire, unbroken, safe,
&c., notwithstanding so many thousands of God’s people, the Jews,
were there in bondage, and would neither be constrained to the
worship of the city Babel, nor restrained from so much of the
worship of the true God as they then could practice, as is plain in the
practice of the three worthies, Shadrach, Meshach, and Abednego,
as also of Daniel, Dan. iii. and Dan. vi.—the peace of the city or
kingdom being a far different peace from the peace of the religion,
or spiritual worship, maintained and professed of the citizens. This
peace of their (worship which worship also in some cities being
various) being a false peace, God’s people were and ought to be
nonconformitants, not daring either to be restrained from the true,
or constrained to false worship; and yet without breach of the civil or
city peace, properly so called.
Peace. Hence it is that so many glorious and The difference
flourishing cities of the world maintain their civil between spiritual
peace; yea, the very Americans and wildest pagans and civil peace.
keep the peace of their towns or cities, though neither in one nor
the other can any man prove a true church of God in those places,
and consequently no spiritual and heavenly peace. The peace
spiritual, whether true or false, being of a higher and far different
nature from the peace of the place or people, being merely and
essentially civil and human.
Truth. Oh! how lost are the sons of men in this The difference
point! To illustrate this:—the church, or company of between the
worshippers, whether true or false, is like unto a spiritual and civil
state. The civil
body or college of physicians in a city—like unto a state, the spiritual
corporation, society, or company of East India or estate, and the
Turkey merchants, or any other society or company church of Christ
distinct in
in London; which companies may hold their courts, Ephesus.
keep their records, hold disputations, and in
matters concerning their society may dissent, divide, break into
schisms and factions, sue and implead each other at the law, yea,
wholly break up and dissolve into pieces and nothing, and yet the
peace of the city not be in the least measure impaired or disturbed;
because the essence or being of the city, and so the well being and
peace thereof, is essentially distinct from those particular societies;
the city courts, city laws, city punishments distinct from theirs. The
city was before them, and stands absolute and entire when such a
corporation or society is taken down. For instance further, the city or
civil state of Ephesus was essentially distinct from the worship of
Diana in the city, or of the whole city. Again, the church of Christ in
Ephesus, which were God’s people, converted and called out from
the worship of that city unto Christianity, or worship of God in Christ,
was distinct from both.
Now suppose that God remove the candlestick from Ephesus, yea,
though the whole worship of the city of Ephesus should be altered,
yet, if men be true and honestly ingenuous to city covenants,
combinations, and principles, all this might be without the least
impeachment or infringement of the peace of the city of Ephesus.
Thus in the city of Smyrna was the city itself or civil estate one
thing, the spiritual or religious state of Smyrna another: the church
of Christ in Smyrna distinct from them both. And the synagogue of
the Jews, whether literally Jews, as some think, or mystically false
Christians, as others, called the synagogue of Satan, Rev. ii., [was]
distinct from all these. And notwithstanding these spiritual
oppositions in point of worship and religion, yet hear we not the
least noise—nor need we, if men keep but the bond of civility, of any
civil breach, or breach of civil peace amongst them; and to
persecute God’s people there for religion, that only was a breach of
civility itself.
CHAP. VII.
Peace. Now to the second query, what it is to hold forth doctrine
or practice in an arrogant or impetuous way?
Truth. Although it hath not pleased Mr. Cotton to The answerer too
declare what is this arrogant or impetuous holding obscure in
forth of doctrine or practice tending to disturbance generals. God’s
meekest servants
of civil peace, I cannot but express my sad and use to be counted
sorrowful observation, how it pleaseth God to leave arrogant and
him as to take up the common reproachful impetuous.
accusation of the accuser of God’s children: to wit, that they are
arrogant and impetuous. Which charge, together with that of
obstinacy, pertinacity, pride, troublers of the city, &c., Satan
commonly loads the meekest of the saints and witnesses of Jesus
with.
To wipe off, therefore, these foul blurs and Six cases wherein
aspersions from the fair and beautiful face of the God’s people have
spouse of Jesus, I shall select and propose five or been bold and
zealous, yet not
six cases, for which God’s witnesses, in all ages arrogant.
and generations of men, have been charged with
arrogance, impetuousness, &c., and yet the God of heaven, and
Judge of all men, hath graciously discharged them from such crimes,
and maintained and avowed them for his faithful and peaceable
servants.
First, God’s people have proclaimed, taught, Christ Jesus and
disputed, for divers months together, a new religion his disciples teach
and worship, contrary to the worship projected in publicly
doctrine,
a new

the town, city, or state where they have lived, or fundamentally


where they have travelled, as did the Lord Jesus different from the
himself over all Galilee, and the apostles after Him religion professed.
in all places, both in the synagogues and market-places, as appears
Acts xvii. 2, 17; Acts xviii. 4, 8. Yet this is no arrogance nor
impetuousness.
Secondly, God’s servants have been zealous for God’s servants
their Lord and Master, even to the very faces of the zealous and bold
highest, and concerning the persons of the highest, to the faces of the
highest. 1 Kings
so far as they have opposed the truth of God: so xviii. 18. Luke xiii.
Elijah to the face of Ahab, “It is not I, but thou, 32. Acts xxiii. 3.
and thy father’s house, that troublest Israel.” So
the Lord Jesus concerning Herod, Go, tell that fox. So Paul, God
delivered me from the mouth of the lion; and to Ananias, Thou
whited wall; and yet in all this no arrogance, nor impetuousness.
Thirdly, God’s people have been immoveable, God’s people
constant, and resolved to the death, in refusing to constantly
submit to false worships, and in preaching and immoveable
death.
to

professing the true worship, contrary to the


express command of public authority. So the three famous worthies
against the command of Nebuchadnezzar, and the uniform
conformity of all nations agreeing upon a false worship, Dan. iii. So
the apostles, Acts iv. and v., and so the witnesses of Jesus in all
ages, who loved not their lives to the death, Rev. xii., not regarding
sweet life nor bitter death, and yet not arrogant, nor impetuous.
Fourthly, God’s people, since the coming of the God’s people ever
King of Israel, the Lord Jesus, have openly and maintained Christ
constantly professed, that no civil magistrate, no Jesus the only
Lord and King to
king, nor Cæsar, have any power over the souls or the conscience.
consciences of their subjects, in the matters of God
and the crown of Jesus; but the civil magistrates themselves, yea,
kings and Cæsars, are bound to subject their own souls to the
ministry and church, the power and government of this Lord Jesus,
the King of kings. Hence was the charge against the apostles (false
in civil, but true in spirituals) that they affirmed that there was
another King, one Jesus, Acts xvii. 7. And, indeed, this was the great
charge against the Lord Jesus himself, which the Jews laid against
him, and for which he suffered death, as appears by the accusation
written over his head upon the gallows, John xix. 19, Jesus of
Nazareth, King of the Jews.
This was and is the sum of all true preaching of That Christ is King
the gospel, or glad news, viz., that God anointed alone over
Jesus to be the sole King and Governor of all the conscience is the
sum of all true
Israel of God in spiritual and soul causes, Ps. ii. 9; preaching.
Acts ii. 36. Yet this kingly power of His, he resolved
not to manage in His own person, but ministerially in the hands of
such messengers which he sent forth to preach and baptize, and to
such as believed that word they preached, John xvii. And yet here
no arrogance, nor impetuousness.
5. God’s people, in delivering the mind and will God’s people have
of God concerning the kingdoms and civil states seemed the
where they have lived, have seemed in all show of disturbers of civil
state.
common sense and rational policy, if men look not
higher with the eye of faith, to endanger and overthrow the very civil
state, as appeareth by all Jeremiah’s preaching and counsel to king
Zedekiah, his princes and people, insomuch that the charge of the
princes against Jeremiah was, that he discouraged the army from
fighting against the Babylonians, and weakened the land from its
own defence; and this charge in the eye of reason, seemed not to
be unreasonable, or unrighteous, Jer. xxxvii. and xxxviii.; and yet in
Jeremiah no arrogance, nor impetuousness.
6. Lastly, God’s people, by their preaching, God’s word and
disputing, &c., have been, though not the cause, people the
yet accidentally the occasion of great contentions occasion
tumults.
of

and divisions, yea, tumults and uproars, in towns


and cities where they have lived and come; and yet neither their
doctrine nor themselves arrogant nor impetuous, however so
charged: for thus the Lord Jesus discovereth men’s false and secure
suppositions, Luke xii. 51, Suppose ye that I am come to give peace
on the earth? I tell you, nay; but rather division; for from henceforth
shall there be five in one house divided, three against two, and two
against three, the father shall be divided against the son and the son
against the father, &c. And thus upon the occasion of the apostles’
preaching the kingdom and worship of God in Christ, were most
commonly uproars and tumults wherever they came. For instance,
those strange and monstrous uproars at Iconium, at Ephesus, at
Jerusalem, Acts xiv. 4; Acts xix. 29, 40; Acts xxi. 30, 31.
CHAP. VIII.
Peace. It will be said, dear Truth, what the Lord [1 Obj.]
Jesus and his messengers taught was truth; but
the question is about error.
Truth. I answer, This distinction now in discussion concerns not
truth or error, but the manner of holding forth or divulging.
I acknowledge that such may be the way and manner of holding
forth, either with railing or reviling, daring or challenging speeches,
or with force of arms, swords, guns, prisons, &c., that it may not
only tend to break, but may actually break the civil peace, or peace
of the city.
Yet these instances propounded are cases of The instances
great opposition and spiritual hostility, and proposed carry a
great show of
occasions of breach of civil peace; and yet as the impetuousness,
borders, or matter, were of gold, so the specks, or yet all are pure
manner, (Cantic. i. [11,]) were of silver: both and peaceable.
matter and manner pure, holy, peaceable, and
inoffensive.
Moreover, I answer, That it is possible and common for persons of
soft and gentle nature and spirits, to hold out falsehood with more
seeming meekness and peaceableness, than the Lord Jesus or his
servants did or do hold forth the true and everlasting gospel. So that
the answerer would be requested to explain what he means by this
arrogant and impetuous holding forth of any doctrine, which very
manner of holding forth tends to break civil peace, and comes under
the cognizance and correction of the civil magistrate, lest he build
the sepulchre of the prophets, and say, If we had been in the
Pharisees’ days, the Roman emperor’s days, or the bloody Marian
days, we would not have been partakers with them in the blood of
the prophets, Matt. xxiii. 30, who were charged with arrogance and
impetuousness.
CHAP. IX.
Peace. It will here be said, whence then ariseth [2 Obj.]
civil dissensions and uproars about matters of
religion?
Truth. I answer: When a kingdom or state, town The true cause of
or family, lies and lives in the guilt of a false god, tumults at the
false Christ, false worship, no wonder if sore eyes preaching
word.
of the

be troubled at the appearance of the light, be it


never so sweet. No wonder if a body full of corrupt humours be
troubled at strong, though wholesome, physic—if persons sleepy and
loving to sleep be troubled at the noise of shrill, though silver,
alarums. No wonder if Adonijah and all his company be amazed and
troubled at the sound of the right heir, king Solomon, 1 Kings i. [41,
49,]—if the husbandmen were troubled when the Lord of the
vineyard sent servant after servant, and at last his only son, and
they beat, and wounded, and killed even the son himself, because
they meant themselves to seize upon the inheritance, unto which
they had no right, Matt. xxi. 38. Hence all those tumults about the
apostles in the Acts, &c. Whereas, good eyes are not so troubled at
light; vigilant and watchful persons, loyal and faithful, are not so
troubled at the true, no, nor at a false religion of Jew or Gentile.
Secondly. Breach of civil peace may arise when A preposterous
false and idolatrous practices are held forth, and way of
yet no breach of civil peace from the doctrine or suppressing
errors.
practice, or the manner of holding forth, but from
that wrong and preposterous way of suppressing, preventing, and
extinguishing such doctrines or practices by weapons of wrath and
blood, whips, stocks, imprisonment, banishment, death, &c.; by
which men commonly are persuaded to convert heretics, and to cast
out unclean spirits, which only the finger of God can do, that is, the
mighty power of the Spirit in the word.
Hence the town is in an uproar, and the country Light only can
takes the alarum to expel that fog or mist of error, expel fogs and
heresy, blasphemy, as is supposed, with swords darkness.
and guns. Whereas it is light alone, even light from the bright
shining Sun of Righteousness, which is able, in the souls and
consciences of men, to dispel and scatter such fogs and darkness.
Hence the sons of men, as David speaks in another case, Ps.
xxxix. [6,] disquiet themselves in vain, and unmercifully disquiet
others, as, by the help of the Lord, in the sequel of this discourse
shall more appear.
CHAP. X.
Peace. Now the last distinction is this: “Persecution for conscience
is either for a rightly informed conscience, or a blind and erroneous
conscience.”
Truth. Indeed, both these consciences are Answ. Persecutors
persecuted; but lamentably blind and erroneous oppress both true
will those consciences shortly appear to be, which and erroneous
consciences.
out of zeal for God, as is pretended, have
persecuted either. And heavy is the doom of those blind guides and
idol shepherds, whose right eye God’s finger of jealousy hath put
out, who flattering the ten horns, or worldly powers, persuade them
what excellent and faithful service they perform to God, in
persecuting both these consciences; either hanging up a rightly
informed conscience, and therein the Lord Jesus himself, between
two malefactors, or else killing the erroneous and the blind, like
Saul, out of zeal to the Israel of God, the poor Gibeonites, whom it
pleased God to permit to live; and yet that hostility and cruelty used
against them, as the repeated judgment year after year upon the
whole land after told them, could not be pardoned until the death of
the persecutor, Saul [and] his sons, had appeased the Lord’s
displeasure, 2 Sam. xxi.
CHAP. XI.
Peace. After explication in these distinctions, it pleaseth the
answerer to give his resolution to the question in four particulars.
First, that he holds it “not lawful to persecute any for conscience’
sake rightly informed, for in persecuting such,” saith he, “Christ
himself is persecuted.” For which reason, truly rendered, he quotes,
Acts ix. 4, Saul, Saul, why persecutest thou me?
Truth. He that shall read this conclusion over a thousand times,
shall as soon find darkness in the bright beams of the sun, as in this
so clear and shining a beam of Truth; viz., that Christ Jesus, in his
truth, must not be persecuted.
Yet, this I must ask, for it will be admired by all sober men, what
should be the cause or inducement to the answerer’s mind to lay
down such a position or thesis as this is, It is not lawful to persecute
the Lord Jesus?
Search all scriptures, histories, records, All persecutors of
monuments; consult with all experiences; did ever Christ profess not
Pharaoh, Saul, Ahab, Jezebel, Scribes and to persecute him.
Pharisees, the Jews, Herod, the bloody Neros, Gardiners, Bonners,
pope, or devil himself, profess to persecute the Son of God, Jesus as
Jesus, Christ as Christ, without a mask or covering?
No, saith Pharaoh, the Israelites are idle, and therefore speak they
of sacrificing. David is risen up in a conspiracy against Saul,
therefore persecute him. Naboth hath blasphemed God and the king,
therefore stone him. Christ is a seducer of the people, a blasphemer
against God, and traitor against Cæsar, therefore hang him.
Christians are schismatical, factious, heretical, therefore persecute
them. The devil hath deluded John Huss, therefore crown him with a
paper of devils, and burn him, &c.
Peace. One thing I see apparently in the Lord’s overruling the pen
of this worthy answerer, viz., a secret whispering from heaven to
him, that although his soul aim at Christ, and hath wrought much for
Christ in many sincere intentions, and God’s merciful and patient
acceptance, yet he hath never left the tents of such who think they
do God good service in killing the Lord Jesus in his servants. And yet
they say, if we had been in the days of our fathers, in queen Mary’s
days, &c., we would never have consented to such persecution. And
therefore, when they persecute Christ Jesus in his truths or servants,
they say, “Do not say you are persecuted for the word, for Christ’s
sake: for we hold it not lawful to persecute Jesus Christ.”
Let me also add a second: So far as he hath been a guide, by
preaching for persecution, I say, wherein he hath been a guide and
leader, by misinterpreting and applying the writings of truth, so far, I
say, his own mouth and hands shall judge (I hope not his person,
but) his actions; for the Lord Jesus hath suffered by him, Acts ix. 5.
And if the Lord Jesus himself were present, Himself should suffer
that in his own person, which his servants witnessing his truth do
suffer for his sake.
CHAP. XII.
Peace. Their second conclusion is this: “It is not lawful to
persecute an erroneous and blind conscience, even in fundamental
and weighty points, till after admonition once or twice, Tit. iii. 11,
and then such consciences may be persecuted; because the word of
God is so clear in fundamental and weighty points, that such a
person cannot but sin against his conscience, and so being
condemned of himself, that is, of his conscience, he may be
persecuted for sinning against his own conscience.”[101]
Truth. I answer, In that great battle between the Lord Jesus and
the devil, it is observable that Satan takes up the weapons of
scripture, and such scripture which in show and colour was excellent
for his purpose; but in this third of Titus, as Solomon speaks of the
birds of heaven, Prov. i. [17,] a man may evidently see the snare:
and I know the time is coming wherein it shall be said, Surely in vain
the net is laid in the sight of the saints (heavenly birds).
So palpably gross and thick is the mist and fog which Satan hath
raised about this scripture, that he that can but see men as trees in
matters of God’s worship, may easily discern what a wonderful deep
sleep God’s people are fallen into concerning the visible kingdom of
Christ; insomuch that this third of Titus, which through fearful
profanations hath so many hundred years been the pretended
bulwark and defence of all the bloody wolves, dens of lions, and
mountains of leopards, hunting and devouring the witnesses of
Jesus, should now be the refuge and defence of (as I hope) the
lambs and little ones of Jesus: yet, in this point, so preaching and
practising so unlike to themselves, to the Lord Jesus, and lamentably
too like to His and their persecutors.
CHAP. XIII.
Peace. Bright Truth, since this place of Titus is such a pretended
bulwark for persecuting of heretics, and under that pretence of
persecuting all thy followers, I beseech you by the bright beams of
the Sun of Righteousness, scatter these mists, and unfold these
particulars out of the text:—
First. What this man is that is an heretic.
Secondly. How this heretic is condemned of himself.
Thirdly. What is this first and second admonition, and by whom it
is supposed to be given.
Fourthly. What is this rejecting of Him, and by whom it is
supposed this rejection was to be made.
Truth. First, what is this heretic? I find him What is meant by
commonly defined to be such an one as is heretic in Titus.
obstinate in fundamentals, and so also I conceive
the answerer seems to resent him, saying, that the apostle renders
this reason why after once and twice admonition he ought to be
persecuted; because in fundamental and principal points of doctrine
and worship, the word of God is so clear, that the heretic cannot but
be convinced in his own conscience.
But of this reason, I find not one tittle mentioned in this scripture.
For although he saith such an one is condemned of himself, yet he
saith not, nor will it follow, that fundamentals are so clear, that after
first and second admonition, a person that submits not to them is
condemned of himself, any more than in lesser points. This eleventh
verse hath reference to the former verses. Titus, an evangelist, a
preacher of glad news, abiding here with the church of Christ at
Crete, is required by Paul to avoid, to reject, and to teach the church
to reject, genealogies, disputes, and unprofitable questions about
the law. Such a like charge it is as he gave to Timothy, left also an
evangelist at Ephesus, 1 Tim. i. 4.
If it should be objected, what is to be done to such contentious,
vain strivers about genealogies and questions unprofitable?—The
apostle seems plainly to answer, Let him be once and twice
admonished.
Obj. Yea, but what if once and twice admonition prevail not?
The apostle seems to answer, αἱρετικὸν ἄνθρωπον; and that is,
the man that is wilfully obstinate after such once and twice
admonition, reject him.
With this scripture agrees that of 1 Tim. vi. 4, 5, where Timothy is
commanded to withdraw himself from such who dote about
questions and strifes of words.
All which are points of a lower and inferior nature, not properly
falling within the terms or notions of those (στοιχεῖα) first principles
and (θεμελίους) foundations of the Christian profession, to wit,
repentance from dead works, faith towards God, the doctrine of
baptisms, and of laying on of hands, the resurrection, and eternal
judgment, Heb. vi. 2, &c.
Concerning these fundamentals (although nothing is so little in the
Christian worship, but may be referred to one of these six, yet) doth
not Paul to Timothy or Titus speak in those places by me alleged, or
of any of these, as may evidently appear by the context and scope.
The beloved spouse of Christ is no receptacle for any filthy person,
obstinate in any filthiness against the purity of the Lord Jesus, who
hath commanded his people to purge out the old leaven, not only
greater portions, but a little leaven which will leaven the whole
lump; and therefore this heretic, or obstinate person in these vain
and unprofitable questions, was to be rejected, as well as if his
obstinacy had been in greater matters.
Again, if there were a door or window left open to vain and
unprofitable questions, and sins of smaller nature, how apt are
persons to cover [them] with a silken covering, and to say, Why, I
am no heretic in fundamentals, spare me in this or that little one,
this or that opinion or practice, these are of an inferior,
circumstantial nature, &c.
So the coherence with the former verses, and The word heretic
the scope of the Spirit of God in this and other like generally
scriptures being carefully observed, this Greek mistaken.
word heretic is no more in true English, and in truth, than an
obstinate and wilful person in the church of Crete, striving and
contending about those unprofitable questions and genealogies, &c.;
and [it] is not such a monster intended in this place, as most
interpreters run upon, to wit, one obstinate in fundamentals, and, as
the answerer makes the apostle to write, in such fundamentals and
principal points, wherein the word of God is so clear that a man
cannot but be convinced in conscience, and therefore is not
persecuted for matter of conscience, but for sinning against his
conscience.
CHAP. XIV.
Peace. Now, in the second place, what is this self-condemnation?
Truth. The apostle seemeth to make this a ground of the rejecting
of such a person—because he is subverted and sinneth, being
condemned of himself. It will appear upon due search, that this self-
condemning is not here intended to be in heretics (as men say) in
fundamentals only; but, as it is meant here, in men obstinate in the
lesser questions, &c.
First, he is subverted, or turned crooked, ἐξέστραπται, a word
opposite to straightness, or rightness. So that the scope is, as I
conceive—upon true and faithful admonition once or twice, the pride
of heart, or heat of wrath, draws a veil over the eyes and heart, so
that the soul is turned off or loosed from the checks of truth.
Secondly, he sinneth, ἁμαρτάνει; that is, being subverted, or
turned aside, he sinneth, or wanders from the path of truth, and is
condemned by himself, αὐτοκάτακριτος; that is, by the secret checks
and whisperings of his own conscience, which will take God’s part
against a man’s self, in smiting, accusing, &c.
Which checks of conscience we find even in Checks of
God’s own dear people, as is most admirably conscience.
opened in the fifth of Canticles, in those sad,
drowsy, and unkind passages of the spouse, in her answer to the
knocks and calls of the Lord Jesus; which God’s people, in all their
awakenings, acknowledge how slightly they have listened to the
checks of their own consciences. This the answerer pleaseth to call
sinning against his conscience, for which he may lawfully be
persecuted: to wit, for sinning against his conscience.
Which conclusion—though painted over with the vermilion of
mistaken scripture, and that old dream of Jew and Gentile that the
crown of Jesus will consist of outward material gold, and his sword
be made of iron or steel, executing judgment in his church and
kingdom by corporal punishment—I hope, by the assistance of the
Lord Jesus, to manifest it to be the overturning and rooting up the
very foundations and roots of all true Christianity, and absolutely
denying the Lord Jesus, the great anointed, to be yet come in the
flesh.
CHAP. XV.
This will appear, if we examine the two last queries of this place of
Titus; to wit,
First. What this admonition is?
Secondly. What is the rejection here intended? Reject him.
First, then, Titus, unto whom this epistle and these directions
were written, and in him to all that succeed him in the like work of
the gospel to the world’s end, was no minister of the civil state,
armed with the majesty and terror of a material sword, who might
for offences against the civil state inflict punishments upon the
bodies of men by imprisonments, whippings, fines, banishment,
death. Titus was a minister of the gospel, or glad tidings, armed only
with the spiritual sword of the word of God, and [with] such spiritual
weapons as (yet) through God were mighty to the casting down of
strongholds, yea, every high thought of the highest head and heart
in the world, 2 Cor. x. 4.
Therefore, these first and second admonitions What is the first
were not civil or corporal punishments on men’s and second
persons or purses, which courts of men may admonition. What
the rejecting of
lawfully inflict upon malefactors; but they were the the heretic was.
reprehensions, convictions, exhortations, and Corporal killing in
persuasions of the word of the eternal God, the law, typing
out spiritual
charged home to the conscience in the name and killing, by
presence of the Lord Jesus, in the midst of the excommunication,
church. Which being despised and not hearkened in the gospel.
to, in the last place follows rejection; which is not a cutting off by
heading, hanging, burning, &c., or an expelling of the country and
coasts; neither [of] which (no, nor any lesser civil punishment) Titus,
nor the church at Crete, had any power to exercise. But it was that
dreadful cutting off from that visible head and body, Christ Jesus and
his church; that purging out of the old leaven from the lump of the
saints; the putting away of the evil and wicked person from the holy
land and commonwealth of God’s Israel, 1 Cor. v. [6, 7.][102] Where
it is observable, that the same word used by Moses for putting a
malefactor to death, in typical Israel, by sword, stoning, &c., Deut.
xiii. 5, is here used by Paul for the spiritual killing, or cutting off by
excommunication, 1 Cor. v. 13, Put away that evil person, &c.
Now, I desire the answerer, and any, in the holy awe and fear of
God, to consider, that—
From whom the first and second admonition was to proceed, from
them also was the rejecting or casting out to proceed, as before. But
not from the civil magistrate, to whom Paul writes not this epistle,
and who also is not bound once and twice to admonish, but may
speedily punish, as he sees cause, the persons or purses of
delinquents against his civil state; but from Titus, the minister or
angel of the church, and from the church with him, were these first
and second admonitions to proceed.
And, therefore, at last also, this rejecting: which can be no other
but a casting out, or excommunicating of him from their church
society.
Indeed, this rejecting is no other than that avoiding which Paul
writes of to the church of Christ at Rome, Rom. xvi. 17; which
avoiding, however wofully perverted by some to prove persecution,
belonged to the governors of Christ’s church and kingdom in Rome,
and not to the Roman emperor, for him to rid and avoid the world of
them by bloody and cruel persecution.
CHAP. XVI.
Peace. The third conclusion is—in points of lesser The third
moment there ought to be a toleration. conclusion
discussed.
Which though I acknowledge to be the truth of
God, yet three things are very observable in the Satan’s policy.
manner of laying it down: for Satan useth excellent arrows to bad
marks, and sometimes beyond the intent, and hidden from the eye
of the archer.
First, saith he, such a person is to be tolerated The answerer
till God may be pleased to reveal his truth to him. granteth a
toleration.
Truth. This is well observed by you: for indeed
this is the very ground why the apostle calls for Patience to be
used toward the
meekness and gentleness toward all men, and opposite.
toward such as oppose themselves, 2 Tim. ii. [25];
because there is a peradventure, or it may be; “It may be, God may
give them repentance.” That God that hath shown mercy to one,
may show mercy to another. It may be, that eye-salve that anointed
one man’s eye who was blind and opposite, may another as blind
and opposite. He that hath given repentance to the husband, may
give it to his wife, &c.
Hence the soul that is lively and sensible of The carriage of a
mercy received to itself in former blindness, soul, sensible of
opposition, and enmity against God, cannot but be mercy, toward
other sinners in
patient and gentle toward the Jews, who yet deny their blindness
the Lord Jesus to be come, and justify their and opposition.
forefathers in murdering of him: toward the Turks,
who acknowledge Christ a great prophet, yet less than Mahomet:
yea, to all the several sorts of anti-christians, who set up many a
false Christ instead of him: and, lastly, to the pagans, and wildest
sorts of the sons of men, who have not yet heard of the Father, nor
the Son: and to all these sorts, Jews, Turks, anti-christians, pagans,

You might also like