SlideShare a Scribd company logo
Visit https://ebookultra.com to download the full version and
explore more ebooks or textbooks
C programming from problem analysis to program
design 4th ed Edition D S Malik
_____ Click the link below to download _____
https://ebookultra.com/download/c-programming-from-problem-
analysis-to-program-design-4th-ed-edition-d-s-malik/
Explore and download more ebooks or textbooks at ebookultra.com
Here are some recommended products that we believe you will be
interested in. You can click the link to download.
Java TM Programming From Problem Analysis to Program
Design 5th Edition D. S. Malik
https://ebookultra.com/download/java-tm-programming-from-problem-
analysis-to-program-design-5th-edition-d-s-malik/
Problem Solving and Program Design in C Third Edition Jeri
R. Hanly
https://ebookultra.com/download/problem-solving-and-program-design-in-
c-third-edition-jeri-r-hanly/
Introduction to Numerical Analysis 2nd Edition D. C.
Sanyal
https://ebookultra.com/download/introduction-to-numerical-
analysis-2nd-edition-d-c-sanyal/
Visual C 2010 How to Program 4th Edition 1 29 pdf Paul
Deitel
https://ebookultra.com/download/visual-c-2010-how-to-program-4th-
edition-1-29-pdf-paul-deitel/
Analysis and Design of Analog Integrated Circuits 4th ed
Edition Paul R. Gray
https://ebookultra.com/download/analysis-and-design-of-analog-
integrated-circuits-4th-ed-edition-paul-r-gray/
Programming and Problem Solving with C Comprehensive
Comprehensive Edition Nell B. Dale
https://ebookultra.com/download/programming-and-problem-solving-with-
c-comprehensive-comprehensive-edition-nell-b-dale/
C how to program Tenth Edition Deitel
https://ebookultra.com/download/c-how-to-program-tenth-edition-deitel/
Programming C 2nd ed Edition Jesse Liberty
https://ebookultra.com/download/programming-c-2nd-ed-edition-jesse-
liberty/
C Programming in Linux 1st edition Edition Haskins D.
https://ebookultra.com/download/c-programming-in-linux-1st-edition-
edition-haskins-d/
C programming from problem analysis to program design 4th ed Edition D  S Malik
C programming from problem analysis to program
design 4th ed Edition D S Malik Digital Instant Download
Author(s): D S Malik
ISBN(s): 9781423902096, 1423902092
Edition: 4th ed
File Details: PDF, 11.47 MB
Year: 2009
Language: english
C++ PROGRAMMING:
FROM PROBLEM ANALYSIS TO PROGRAM DESIGN
FOURTH EDITION
D.S. MALIK
Australia  Brazil  Japan  Korea  Mexico  Singapore  Spain  United Kingdom  United States
C++ Programming: From Problem Analysis
to Program Design, Fourth Edition
by D.S. Malik
Senior Product Manager: Alyssa Pratt
Acquisitions Editor: Amy Jollymore
Content Product Manager: Jill Braiewa
Marketing Manager: Bryant Chrzan
Editorial Assistant: Patrick Frank
Print Buyer: Julio Esperas
Cover Designer: Lisa Kuhn, Curio Press, LLC
Compositor: Integra
Art Director: Marissa Falco
Validation: Green Pen Quality Assurance
Proofreader: Green Pen Quality Assurance
Indexer: Liz Cunningham
Printed in Canada
1 2 3 4 5 6 7 14 13 12 11 10 09 08
ª 2009 Course Technology, Cengage Learning
ALL RIGHTS RESERVED. No part of this work covered by the
copyright herein may be reproduced, transmitted, stored or used
in any form or by any means graphic, electronic, or mechanical,
including but not limited to photocopying, recording, scanning,
digitizing, taping, Web distribution, information networks, or
information storage and retrieval systems, except as permitted
under Section 107 or 108 of the 1976 United States Copyright Act,
without the prior written permission of the publisher.
For product information and technology assistance, contact us at
Cengage Learning Customer  Sales Support, 1-800-354-9706
For permission to use material from this text or product, submit
all requests online at cengage.com/permissions
Further permissions questions can be emailed to
permissionrequest@cengage.com
ISBN-13: 978-1-4239-0209-6
ISBN-10: 1-4239-0209-2
Course Technology
25 Thomson Place
Boston, MA 02210
USA
Visual
C++ .NET and PowerPoint
are registered trademarks
of the Microsoft Corporation; Pentium
is a registered
trademark of Intel Corporation; IBM is a registered trademark
of Industrial Business Machines.
Disclaimer
Course Technology reserves the right to revise this publication
and make changes from time to time in its content without
notice.
The programs in this book are for instructional purposes only.
They have been tested with care, but are not guaranteed for any
particular intent beyond educational purposes. The authors and
the publisher do not offer any warranties or representations, nor
do they accept any liabilities with respect to the programs.
Cengage Learning is a leading provider of customized
learning solutions with office locations around the globe,
including Singapore, the United Kingdom, Australia, Mexico,
Brazil, and Japan. Locate your local office at:
international.cengage.com/region
Cengage Learning products are represented in Canada
by Nelson Education, Ltd.
For your lifelong learning solutions, visit
course.cengage.com
Visit our corporate website at cengage.com
TO
My Daughter
Shelly Malik
C programming from problem analysis to program design 4th ed Edition D  S Malik
PREFACE xxvii
1. An Overview of Computers and Programming Languages 1
2. Basic Elements of C++ 29
3. Input/Output 115
4. Control Structures I (Selection) 167
5. Control Structures II (Repetition) 231
6. User-Defined Functions I 307
7. User-Defined Functions II 345
8. User-Defined Simple Data Types, Namespaces,
and the string Type 415
9. Arrays and Strings 469
10. Applications of Arrays (Searching and Sorting)
and the vector Type 545
11. Records (structs) 603
12. Classes and Data Abstraction 641
13. Inheritance and Composition 717
14. Pointers, Classes, Virtual Functions, and Abstract Classes 785
15. Overloading and Templates 853
16. Exception Handling 943
17. Recursion 981
18. Linked Lists 1017
19. Stacks and Queues 1111
BRIEF CONTENTS
APPENDIX A Reserved Words 1219
APPENDIX B Operator Precedence 1221
APPENDIX C Character Sets 1223
APPENDIX D Operator Overloading 1227
APPENDIX E Additional C++ Topics 1229
APPENDIX F Header Files 1251
APPENDIX G Memory Size on a System and Random
Number Generator 1261
APPENDIX H Standard Template Library (STL) 1263
APPENDIX I Answers to Odd-Numbered Exercises 1305
INDEX 1327
vi | C++ Programming: From Problem Analysis to Program Design, Fourth Edition
Preface xxvii
AN OVERVIEW OF COMPUTERS
AND PROGRAMMING LANGUAGES 1
Introduction 2
A Brief Overview of the History of Computers 2
Elements of a Computer System 3
Hardware 4
Central Processing Unit 4
Main Memory 5
Secondary Storage 6
Input /Output Devices 6
Software 6
The Language of a Computer 6
The Evolution of Programming Languages 8
A C++ Program 10
Processing a C++ Program 12
Programming with the Problem
Analysis–Coding–Execution Cycle 14
Programming Methodologies 22
Structured Programming 22
Object-Oriented Programming 22
ANSI/ISO Standard C++ 24
Quick Review 24
Exercises 26
1
TABLE OF CONTENTS
BASIC ELEMENTS OF C++ 29
The Basics of a C++ Program 30
Comments 32
Special Symbols 32
Reserved Words (Keywords) 33
Identifiers 33
Whitespaces 34
Data Types 34
Simple Data Types 35
Floating-Point Data Types 38
Arithmetic Operators and Operator Precedence 40
Order of Precedence 44
Expressions 45
Mixed Expressions 46
Type Conversion (Casting) 48
string Type 50
Input 51
Allocating Memory with Constants and Variables 52
Putting Data into Variables 54
Assignment Statement 54
Saving and Using the Value of an Expression 58
Declaring and Initializing Variables 59
Input (Read) Statement 60
Variable Initialization 63
Increment and Decrement Operators 67
Output 69
Preprocessor Directives 77
namespace and Using cin and cout in a Program 78
Using the string Data Type in a Program 78
Creating a C++ Program 79
Program Style and Form 83
Syntax 83
2
Use of Blanks 84
viii | C++ Programming: From Problem Analysis to Program Design, Fourth Edition
Use of Semicolons, Brackets, and Commas 84
Semantics 84
Naming Identifiers 84
Prompt Lines 85
Documentation 86
Form and Style 86
More on Assignment Statements 88
Programming Example: Convert Length 99
Programming Example: Make Change 93
Quick Review 97
Exercises 99
Programming Exercises 107
INPUT/OUTPUT 115
I/O Streams and Standard I/O Devices 116
cin and the Extraction Operator  117
Using Predefined Functions in a Program 123
cin and the get Function 125
cin and the ignore Function 126
The putback and peek Functions 128
The Dot Notation Between I/O Stream Variables
and I/O Functions: A Precaution 130
Input Failure 131
The clear Function 133
Output and Formatting Output 135
setprecision Manipulator 135
fixed Manipulator 136
showpoint Manipulator 136
setw 138
Additional Output Formatting Tools 141
setfill Manipulator 141
left and right Manipulators 143
3
Input/Output and the string Type 145
Table of Contents | ix
File Input/Output 146
Programming Example: Movie Ticket Sale and
Donation to Charity 150
Programming Example: Student Grade 155
Quick Review 158
Exercises 160
Programming Exercises 163
CONTROL STRUCTURES I (SELECTION) 167
Control Structures 168
Relational Operators 169
Relational Operators and Simple Data Types 171
Comparing Floating-point Numbers for equality 171
Comparing Characters 172
Relational Operators and the string Type 173
Logical (Boolean) Operators and Logical Expressions 175
Order of Precedence 177
Short-Circuit Evaluation 181
int Data Type and Logical (Boolean) Expressions 182
bool Data Type and Logical (Boolean) Expressions 183
Selection: if and if...else 184
One-Way Selection 185
Two-Way Selection 187
Compound (Block of) Statements 191
Multiple Selections: Nested if 192
Comparing if...else Statements with
a Series of if Statements 196
Using Pseudocode to Develop, Test, and Debug a Program 196
Input Failure and the if Statement 199
Confusion Between the Equality Operator (==) and
the Assignment Operator (=) 202
Conditional Operator (?:) 203
4
switch Structures 204
x | C++ Programming: From Problem Analysis to Program Design, Fourth Edition
Terminating a Program with the
assert Function 211
Programming Example: Cable Company Billing 213
Quick Review 219
Exercises 220
Programming Exercises 225
CONTROL STRUCTURES II (REPETITION) 231
Why Is Repetition Needed? 232
while Looping (Repetition) Structure 233
Designing while loops 235
Case 1: Counter-Controlled while Loops 236
Case 2: Sentinel-Controlled while Loops 239
Case 3: Flag-Controlled while Loops 243
Case 4: EOF-Controlled while Loops 247
eof Function 248
More on Expressions in while Statements 249
Programming Example: Checking
Account Balance 250
Programming Example: Fibonacci Number 259
for Looping (Repetition) Structure 264
Programming Example: Classifying Numbers 270
do...while Looping (Repetition) Structure 274
Choosing the Right Looping Structure 278
break and continue Statements 278
Nested Control Structures 281
Quick Review 288
Exercises 290
Programming Exercises 300
5
Table of Contents | xi
USER-DEFINED FUNCTIONS I 307
Predefined Functions 308
User-Defined Functions 311
Value-Returning Functions 312
Syntax: Value-Returning Functions 314
Syntax: Formal Parameter List 314
Function Call 314
Syntax: Actual Parameter List 314
return Statement 315
Syntax: return Statement 315
Function Prototype 318
Syntax: Function Prototype 319
Flow of Execution 325
Programming Example: Largest Number 326
Programming Example: Cable Company 327
Quick Review 333
Exercises 335
Programming Exercises 340
USER-DEFINED FUNCTIONS II 345
Void Functions 346
Void Functions without Parameters 346
Void Functions with Parameters 349
Value Parameters 354
Reference Variables as Parameters 356
Value and Reference Parameters and Memory Allocation 360
Reference Parameters and Value-Returning Functions 370
Scope of an Identifier 370
Global Variables, Named Constants, and Side Effects 374
Static and Automatic Variables 376
6
7
xii | C++ Programming: From Problem Analysis to Program Design, Fourth Edition
Function Overloading: An Introduction 378
Functions with Default Parameters 380
Programming Example: Classify Numbers 383
Programming Example: Data Comparison 388
Quick Review 398
Exercises 400
Programming Exercises 407
USER-DEFINED SIMPLE DATA TYPES,
NAMESPACES, AND THE string TYPE 415
Enumeration Type 416
Declaring Variables 418
Assignment 418
Operations on Enumeration Types 419
Relational Operators 419
Input /Output of Enumeration Types 420
Functions and Enumeration Types 422
Declaring Variables When Defining the Enumeration Type 424
Anonymous Data Types 424
typedef Statement 425
Programming Example: The Game of Rock, Paper,
and Scissors 426
Namespaces 437
string Type 442
Additional string Operations 446
length Function 446
size Function 448
find Function 449
substr Function 452
swap Function 454
Programming Example: Pig Latin Strings 454
8
Quick Review 460
Table of Contents | xiii
Exercises 463
Programming Exercises 466
ARRAYS AND STRINGS 469
Arrays 471
Accessing Array Components 472
Processing One-Dimensional Arrays 475
Array Index Out of Bounds 479
Array Initialization During Declaration 480
Partial Initialization of Arrays During Declaration 480
Some Restrictions on Array Processing 481
Arrays as Parameters to Functions 482
Constant Arrays as Formal Parameters 483
Base Address of an Array and Array in Computer Memory 485
Functions Cannot Return a Value of the Type Array 488
Integral Data Type and Array Indices 491
Other Ways to Declare Arrays 491
C-strings (Character Arrays) 492
String Comparison 494
Reading and Writing Strings 496
String Input 496
String Output 497
Specifying Input/Output Files at Execution Time 498
string Type and Input/Output Files 498
Parallel Arrays 499
Two- and Multidimensional Arrays 500
Accessing Array Components 502
Two-Dimensional Array Initialization During Declaration 503
Two-Dimensional Arrays and Enumeration Types 503
Initialization 507
Print 507
Input 507
Sum by Row 508
Sum by Column 508
9
xiv | C++ Programming: From Problem Analysis to Program Design, Fourth Edition
Largest Element in Each Row and Each Column 508
Reversing Diagonal 509
Passing Two-Dimensional Arrays as Parameters to Functions 511
Arrays of Strings 514
Arrays of Strings and the string Type 514
Arrays of Strings and C-Strings (Character Arrays) 515
Another Way to Declare a Two-Dimensional Array 516
Multidimensional Arrays 517
Programming Example: Code Detection 518
Programming Example: Text Processing 525
Quick Review 532
Exercises 534
Programming Exercises 539
APPLICATIONS OF ARRAYS (SEARCHING
AND SORTING) AND THE vector TYPE 545
List Processing 546
Searching 546
Bubble Sort 551
Selection Sort 555
Insertion Sort 559
Sequential Search on an Ordered List 566
Binary Search 569
Performance of Binary Search 572
vector Type (class) 574
Programming Example: Election Results 579
Quick Review 595
Exercises 597
Programming Exercises 600
10
Table of Contents | xv
RECORDS (structS) 603
Records (structs) 604
Accessing struct Members 606
Assignment 608
Comparison (Relational Operators) 609
Input /Output 610
struct Variables and Functions 610
Arrays versus structs 611
Arrays in structs 612
structs in Arrays 614
structs within a struct 617
Programming Example: Sales Data Analysis 621
Quick Review 635
Exercises 635
Programming Exercises 637
CLASSES AND DATA ABSTRACTION 641
Classes 642
Unified Modeling Language Class Diagrams 645
Variable (Object) Declaration 646
Accessing Class Members 647
Built-in Operations on Classes 648
Assignment Operator and Classes 649
Class Scope 650
Functions and Classes 650
Reference Parameters and Class Objects (Variables) 650
Implementation of Member Functions 651
Accessor and Mutator Functions 656
Order of public and private Members of a Class 661
Constructors 662
Invoking a Constructor 664
Invoking the Default Constructor 664
Invoking a Constructor with Parameters 665
Constructors and Default Parameters 668
11
12
xvi | C++ Programming: From Problem Analysis to Program Design, Fourth Edition
Classes and Constructors: A Precaution 670
Arrays of Class Objects (Variables) and Constructors 671
Destructors 673
Data Abstraction, Classes, and Abstract Data Types 674
A struct versus a class 676
Information Hiding 677
Executable Code 681
Static Members of a Class 685
Programming Example: Candy Machine 691
Quick Review 706
Exercises 708
Programming Exercises 713
INHERITANCE AND COMPOSITION 717
Inheritance 718
Redefining (Overriding) Member Functions
of the Base Class 721
Constructors of Derived and Base Classes 728
Multiple Inclusions of a Header File 736
C++ Stream Classes 738
Protected Members of a Class 739
Inheritance as public, protected, or private 739
Composition 743
Object-Oriented Design (OOD) and
Object-Oriented Programming (OOP) 748
Identifying Classes, Objects, and Operations 750
Programming Example: Grade Report 751
Quick Review 772
Exercises 773
Programming Exercises 779
13
Table of Contents | xvii
POINTERS, CLASSES, VIRTUAL FUNCTIONS, AND
ABSTRACT CLASSES 785
Pointer Data Type and Pointer Variables 786
Declaring Pointer Variables 786
Address of Operator () 787
Dereferencing Operator (*) 788
Classes, Structs, and Pointer Variables 794
Initializing Pointer Variables 797
Dynamic Variables 797
Operator new 798
Operator delete 799
Operations on Pointer Variables 801
Dynamic Arrays 803
Functions and Pointers 806
Pointers and Function Return Values 806
Dynamic Two-Dimensional Arrays 807
Shallow versus Deep Copy and Pointers 810
Classes and Pointers: Some Peculiarities 812
Destructor 813
Assignment Operator 814
Copy Constructor 816
Inheritance, Pointers, and Virtual Functions 823
Classes and Virtual Destructors 830
Abstract Classes and Pure Virtual Functions 830
Address of Operator and Classes 838
Quick Review 841
Exercises 844
Programming Exercises 851
14
xviii | C++ Programming: From Problem Analysis to Program Design, Fourth Edition
OVERLOADING AND TEMPLATES 853
Why Operator Overloading Is Needed 854
Operator Overloading 855
Syntax for Operator Functions 856
Overloading an Operator: Some Restrictions 856
Pointer this 857
Friend Functions of Classes 862
Operator Functions as Member Functions
and Nonmember Functions 865
Overloading Binary Operators 868
Overloading the Stream Insertion () and
Extraction () Operators 874
Overloading the Assignment Operator (=) 879
Overloading Unary Operators 887
Operator Overloading: Member versus Nonmember 893
Classes and Pointer Member Variables (Revisited) 894
Operator Overloading: One Final Word 894
Programming Example: clockType 894
Programming Example: Complex Numbers 903
Overloading the Array Index (Subscript) Operator ([]) 908
Programming Example: newString 910
Function Overloading 916
Templates 917
Function Templates 917
Class Templates 919
Quick Review 927
Exercises 929
Programming Exercises 934
EXCEPTION HANDLING 943
Handling Exceptions within a Program 944
C++ Mechanisms of Exception Handling 948
15
16
Table of Contents | xix
try/catch Block 948
Using C++ Exception Classes 955
Creating Your Own Exception Classes 959
Rethrowing and Throwing an Exception 965
Exception Handling Techniques 970
Terminate the Program 970
Fix the Error and Continue 970
Log the Error and Continue 972
Stack Unwinding 972
Quick Review 976
Exercises 978
Programming Exercises 980
RECURSION 981
Recursive Definitions 982
Direct and Indirect Recursion 985
Infinite Recursion 985
Problem Solving Using Recursion 986
Tower of Hanoi: Analysis 997
Recursion or Iteration? 998
Programming Example: Converting a Number from
Binary to Decimal 999
Programming Example: Converting a Number from
Decimal to Binary 1004
Quick Review 1008
Exercises 1009
Programming Exercises 1012
LINKED LISTS 1017
Linked Lists 1018
Linked Lists: Some Properties 1019
17
Building a Linked List 1028
18
xx | C++ Programming: From Problem Analysis to Program Design, Fourth Edition
Other documents randomly have
different content
said, implied liberty. Men should not turn their hearts to Christ through fear
but through love. The God that has been and is still preached in the
churches throughout the land, is not a god but a devil. If he could picture a
monster the most horrible and cruel imaginable it would be the God which
is preached in many of our churches and to thousands of our people. He
maintained his utter independence, and said that no man could say to him
what he should do or what he should not do, he was responsible to God
alone, and if he was inspired to preach the gospel to his people he would do
it with all his heart and all his soul and would give utterance to every
thought he chose. ‘Men say I shall not, I say I shall.’ Christianity, he said,
had been trampled under foot by the spirit of ecclesiastical authority, that
the time was approaching when liberty in the church was to rule triumphant
and until it did the world would suffer.
“His voice rose very high and it was altogether the most eloquent effort
he has ever made in this pulpit,—and is so conceded by all whom I have
spoken with. I never saw Mr. Beecher when he appeared happier and
healthier than now.
“It had been almost decided to send him away on a six months’ vacation
for rest, but he to-day refused to take it, saying that he did not need it and
would rather stay at home with his people as ‘they needed his preaching and
he needed to preach.’ I am going to call on him soon.”
To attempt to enumerate the authors and the artists, the critics and the
clergymen, the naturalists and the nature “amateurs” with whom he was on
friendly and even intimate terms would be to make a long catalogue of the
most eminent men of his time. It would include such names as Stedman and
Stoddard, Beard and Murphy, Abbott and Ludlow, Burroughs and Roe and
Ellwanger, Parsons and Alden and the Egglestons. His correspondence
included men and women from all over the world. His genius appealed to
men of all classes and pursuits—to all who had the simple heart of
childhood and its open eye. And that genius was so full of the vitality of the
individual, so warm with his own personality, that to admire him as artist or
naturalist was to be drawn to him as a man. He seemed to come to people as
a friendly interpreter and as a helpful friend, unlocking new gates outward
into nature’s life, disclosing new horizons, telling new secrets of the
Cosmos. The tone of the letters he received from hundreds of unknown
admirers shows that he was everywhere held as a personal friend, a teacher
who won at once the attention, the admiration, and the love of his disciples.
Two letters from correspondents curiously remote from each other are
types of the hundreds who were drawn by the human spirit of his writings
to ply him with questions, or overwhelm him with appreciation and
gratitude. From the confines of civilization on the north to the boundary of
the nation on the south, the friends whom he had made by his pencil and his
pen, his art and his scientific knowledge, appealed to him with an
instinctive feeling that he would understand them, welcome them, help
them if he could. Nor were they ever disappointed. The first letter is from
bleak Anticosti Island:
“The Lighthouse,
“South West Point,
“13th May, 1895.
“Dear Mr. Gibson:
“We hesitated a long time before coming to you with this question. We
knew that so many must worry you in the same way, and yet we have come
at last like the rest. I can only hope you will forgive us. We live on
Anticosti, an island with a very bad name in the Gulf of St. Lawrence. I
know you never heard a good word of it. I must beg you, though, to believe
that it is as much belied as the toadstools you championed last year. Its
woods and plains are full of treasures and among them goodly stores of
those same toadstools. They were all under the ban, though, as in other
places and we dared only look at them regretfully.
“You don’t know how glad we were when you broke the spell in
‘Harper’s’ last summer. I don’t think anybody else was so glad. You know
we live alone here and try to make friends of ‘all out-doors’ and anything
like this means more to us than to most people.
“For a while then we were happy. We knew you and we had faith enough
in ourselves to believe that we were able to understand anything you wrote
for everyday folks, let alone something that led them among deadly
poisons. But very soon we began to fret. Nearly every toadstool we met
near home was a Russula and generally far larger and more delicious-
looking than anything else we could find far or near.
“They went through every shade of redness and pinkness and
pepperiness. I should be afraid to say how often I vowed with pricking lips
that I would taste no more. Some ‘were not so very red or so very peppery’
and then ‘how very far Mr. Gibson must be keeping on the safe side for the
sake of stupid people.’ I tried cooking some of them though I felt in my
heart that they were the same as the rest and found them very good. But
every one was, and very reasonably, shy of them.
“At this critical time we came across the article enclosed.
“Here was another excitement. But who was Charles McIlvaine? ‘He
knows what he is talking about anyway,’ I said, ‘and I am going to try the
whole red tribe’; and I did.
“They were all he said and after a while the others took courage and we
even gave some to a friend who had discovered the common mushroom for
us.
“I felt misgivings all through the winter, though, about the coming
season. I did not want to risk unpleasantness and ‘emeticus’ is such a very
ominous name. And who was McIlvaine, after all? Wasn’t it rash to listen to
him?
“And lo and behold you talk now in the ‘Bazar’ of Captain Charles
McIlvaine the eminent mycologist!
“Did you know that he said all that about the Russula? If we follow his
advice what risk do we run of making people ill? We don’t mind so much
about ourselves but we must think a little more of our guests. They are rare
enough without poisoning any of them.
“Please give us just a little word of advice, anything you find time to say.
And please, even if you cannot excuse this liberty and cannot say anything,
send me back the newspaper cutting.
“I never intended to say all this when I began and feel quite ashamed
when I look back at the length of my letter. Hoping that you will excuse it,
believe me with warmest thanks and gratitude,
“Yours faithfully,
“Grace Pope.
“W. Hamilton Gibson, Esq.,
“New York.”
The second letter, a few years before, came from the extreme southwest:
“San Antonio, Texas,
“Jan’y 13th, 1892.
“My dear Mr. Gibson:
“Will you pardon me, an entire stranger, and a Texan writing to you, but
I want to tell you how much I have enjoyed and profited by reading your
‘Sharp Eyes.’ A good friend sent it from Denver as a Xmas remembrance
and each night I read some portion because it is a never failing delight to
read of my many familiar friends in Nature you describe in such a clear and
delightful manner. Knowing your time is valuable and you are of human
patience, though you have the young lover of Nature at heart, I am tempted
to ask you to solve for me a problem that has been not only a mystery for
several years but an actual annoyance not to be able to find a satisfactory
explanation. It is this. Often in winter time we see flies and mosquitoes
swollen almost to bursting attached to panes of glass, their little bodies
oftentimes striped like a yellow wasp’s and surrounding them and attached
to the glass is a misty deposit of some kind. It is the cause and object of this
misty deposit I seek. If you will enlighten me upon this subject by
explanation or reference you will add only one more favor to a large
number.
“That you have been the means of adding greatly to the pleasure and
instruction of the present generation, young and old, I see from my limited
field of observation. That you may be spared many years to continue your
good work and enjoy the pleasures of God’s Nature in this world and reap a
rich reward in the Life hereafter is the earnest wish of
“Your sincere admirer,
“Archibald A. Alexander.”
One could add to these indefinitely. A minister in the northwest, a lover
of flowers and a true woodsman, has a fine program for a canoeing trip on
Minnesota rivers and lakes; a farmer’s wife writes to ask direction to some
simple manual which will help her copy flowers in color, and encloses
some examples of her simple work; an admiring poet sends some verses
which will not scan, and will be glad to have her adulations published,—
and remuneration secured; another admirer insists that he is not an
autograph fiend,—but he would like a letter in reply to his praises; an
impecunious poet suggests an immediate loan of ten dollars; a mother in a
western state sends some admirable sketches done by her daughter and
wishes his judgment upon their merits. People felt his kindly nature in his
writings and in his pictures. It was a virtue that went out of him, and drew
like a loadstone.
Nowhere, perhaps, outside the charmed and privileged circle of the
“Gunnery” boys,—they were always “boys” and “girls” to one another!—
was he more welcome or more warmly cherished than at the Authors Club.
He counted it a great honor to be chosen into that favored circle, and as he
was one of its earliest members, so he was one of its most constant and
loyal supporters. Whenever he could he joined in its social conclaves and its
decorous revels; and his presence was always a guarantee of good
fellowship, unconstrained, talkative, and sparkling. In the earliest home of
the Club in East Fifteenth St.; in its rooms in West Twenty-fourth St.; later
in the West Twenty-third St. quarters; and finally in the soaring apartments
to which it attained, Gibson’s was one of the familiar figures, as it was one
of those most commonly sought out of strangers. But it was never a figure
with “a certain solitariness,” as seen by his imaginative critic. Wherever
Gibson sat or stood, there was sure to be a group. Men gathered about him
as birds flock to the banks of a rippling stream. Nor was he any slower in
coming to the side of others. He sought companionship as frankly as he
gave it. He was always running over with bright, attractive talk; but he had
a willing ear. He was conscious of his power to attract; but it never bred in
him the slightest condescension toward others. He was passionately fond of
wit, and humor, and all the honest fun of life; but he never showed a particle
of coarseness, and he never confounded fun with foulness. He was as much
at home with the largest minds and characters as he was with the simple
farmers and rustics, he delighted to describe; for he met all men on the
ground of their common brotherhood,
The Edge of the Woods
From a Painting
and had no absurd consciousness of external condition and accidental
differences to embarrass him. His reverence and his religiousness were
profound elements of his nature. He was no formalist. Probably he did not
set a very high value upon some of the externals of spiritual life which seem
so important to many men. He was, indeed, a loyal supporter of religious
works and enterprises, as he was a member of the visible church; and he
paid the highest respect to all that pertained to what is commonly demanded
as a mark of Christian life and interest. But he had a life in the Spirit which
was larger and broader than all that. He felt and he loved the Divine Life in
all that he saw, and heard, and studied, and tried to draw and paint, in the
world around him. To his thinking it was all the expression of God; as such
he reverenced the creation. Through this world of nature he was always
seeing and feeling the Father. His letters breathe a note of honest
devoutness which passes all lip-service. And scattered through his pages are
frequent expressions of a spirituality deeper than any words or phrases
which so easily become cant. There is a deep revelation of the heart of the
man in a passage in “Woodnotes.” Listen to his soul pouring itself out in
these words:
“Sitting alone in the woods I have sometimes known a moment of such
supreme exaltation that I have almost questioned my sanity—a spirit and an
impulse which I would no more attempt to frame into words than I should
think to define the Deity himself—‘I am glad to the brink of fear.’ My own
identity is a mystery. The presence of the dearest friend on earth would be
an unwelcome intrusion. The pulses of the woods beat through me. The
joyous flight of bird brings buoyant memories, the linnet’s song now seems
swelling in my own throat. Happy Donatello in the garden of the Borghese
is no longer a myth, though even he knew no such joy as this. At such times
—and are they not vouchsafed to every true ‘Holy-Lander’?—I am
conscious of an unwonted sympathy in nature—a strange, double,
paradoxical existence, which, while lifting me to the clouds, still holds me
to the earth.”
It was this inner soul of nature as it filled the inner soul of the man,
which he felt a growing power to express in art. But before he could speak
his message he passed from our presence.
F
CHAPTER IX
AFTERGLOW
OR many months preceding the summer of 1896, Mr. Gibson had felt
himself failing in health. The strain of his long lecture-tours told
seriously upon his strength, and several times he suffered from fainting
attacks and vertigo, sometimes in the very presence of his audiences. When
he withdrew from the city in the early summer, it was with a knowledge that
his health was impaired, and the hope, as well, that in Washington, at “The
Sumacs,” he would find the quiet and the rest which would restore the tone
of his system and repair the wastes of excessive work. But this hope was
not to be fulfilled. He himself was depressed and apprehensive, and his
friends shared his fears. A slight improvement seemed to come with
midsummer, but proved illusory. On Thursday evening, the 16th of July, he
left his home to go after his mail at the village post-office. Meeting a
number of friends and acquaintances he sat down outside the office for a
chat with them. He appeared to be in excellent spirits, and for an hour was
quite himself. Then he turned to a gentleman beside him and asked if there
was anything wrong about his speech. He said his voice seemed thick, and
that he could not articulate plainly. A book he held in his hand dropped to
the floor several times, and he seemed unable to retain his hold of it. Being
asked if he felt ill, he said that he did, and suggested that he should walk to
the residence of Dr. Ford. His friends prevailed upon him to remain quiet,
and one of their number hurried for medical aid. Drs. Ford and Brown soon
arrived, and they did all in their power for their patient. A wagon was soon
brought to the door, and Mr. Gibson was placed in a chair in the wagon, but
before they had reached his beautiful home, “The Sumacs,” he had ceased
breathing, and upon the friends who had accompanied him was thrown the
task of breaking the sad news to his wife and children.
On Sunday, the 19th, occurred the funeral services, a tender and
sympathetic account of which was given in “Plymouth Chimes.”
“The village of Washington, Connecticut, has been made famous by the
‘Gunnery’ School, and by Mr. Gibson, its illustrious pupil, who received
within its walls the inspiration of his career. The forests, thickets, and
hillsides of that picturesque region furnished the favorite subjects of his
pencil and pen; and, after he had achieved professional success, he
established at Washington, among the friends of his boyhood, his country
home. Everybody there knew and loved him, and was proud of him. And
when death suddenly came to him, it was felt to be an element of mercy in
the shock of sorrow, that he was struck down in the midst of happy
intercourse with his neighbors.
“The funeral service, held on Sunday afternoon, July 19th, at his
residence, ‘The Sumacs,’ was keyed throughout to triumph and
thanksgiving, rather than gloom. The day was bright and cool; birds sang
about the house; wild flowers and green branches filled all available spaces;
and the crowd of neighbors sat in the pleasant rooms or out on the porch
beyond the open door.
“The Scripture, read by Mr. Carter, the Washington pastor, comprised
passages descriptive of the glory of God in nature, and of the triumph and
rest of the saints. The prayer, by Mr. Turner (formerly pastor at Washington,
and now chaplain at the Hampton Institute, in Virginia), was similarly
attuned to solemn exultation. The hymns (favorites of Mr. Gibson) were
‘Love Divine,’ ‘Abide with Me,’ and ‘Upward Where the Stars are
Burning’—the last sung exquisitely as a solo; the two others, with scarcely
less tender sweetness, by the whole company.
“The address, by his life-long friend, Dr. R. W. Raymond, was, from
beginning to end, an expression of gratitude rather than grief. It enumerated
the features of the victorious, happy, fruitful, sincere, loving, and devout
life which had been sent as a blessing and inspiration among men. Several
anecdotes were related, illustrative of Mr. Gibson’s sympathy with all living
things, and of the surprising way in which it was recognized and
reciprocated.
“It was told, for instance, how he could take a wild bird from the branch
of a tree, caress it, and return it unharmed and unfrightened; how strange
birds would fly to him and light upon his shoulder; and how even butterflies
seemed to be attracted to him.
“The address closed with a beautiful poem, written for the occasion by
Dr. Raymond.
“Through shady roads the funeral procession of carriages and
pedestrians passed to the loveliest spot in Washington, the burial-ground,
which occupies the side of a hill, commanding a prospect of forest and
meadow, stream and mountain, full of peace and beauty. The grave was
lined with green branches and fringed with goldenrod; and after a hymn
‘The Home-land’ and a prayer, the casket was gently lowered into this
bower of rest. And then, under the benediction of the sunset, the mortal
body of William Hamilton Gibson was left to its repose.”
The fine word spoken by Dr. Raymond on this occasion is one which
should have a lasting place among the memorials of his friend. It was in
such entire harmony with the spirit of the hour, with the memories which
were uppermost, with the sense of loss, and the still deeper sense of life
enriched and
The Village Green
Washington, Connecticut
brightened by the earthly work which was ended, that it was instantly
recognized as at once synopsis and echo of Gibson’s career. Dr. Raymond
said:
“I count it a great privilege to stand here this day, and utter the love and
sorrow of so many souls. Words are but feeble expedients for such a task;
yet there is, in one respect, a significant choice of words. Shall we express
grief or gratitude? Shall we measure our loss by the vacancy it has left
behind, or count with joy the treasure we have had, giving God thanks that
we had it so long and so abundantly? For my part, I would not desecrate
with the wailing of grief this sky of Sabbath peace, or that face of serene
triumph and repose. Let us measure our love and our sorrow, then, in terms
of gratitude. Thanks be to God for the unspeakable gift to us of a victorious,
happy, fruitful, helpful, sincere, loving, devout, inspired life, which, once
received among us, we can never lose. Even the nearest and dearest and
most bitterly bereaved can comfort grief with gratitude.
“I say it was a victorious life. I knew William Hamilton Gibson when he
was a boy; and I knew the struggle of his early life, when, impelled by an
irresistible impulse towards art, and nature as its inspiration, he steadily
pursued that ideal, “not disobedient to the heavenly vision,’ until, in spite of
the warnings of the would-be wise, and the carpings of the would-be
critical, he won for himself a recognition of his genius and the love and
thanks of multitudes whose lives he had enriched and exalted by his work.
He accomplished what he set out to do; and I say his victorious life is in
that respect a blessing to us, as showing for our encouragement, in these
days of change and failure, that a man may still be lord of his
circumstances, and, as in the affairs of the heart, so also in the affairs of
business, may win and wear his first love.
“But some men gain their victories at heavy cost, and bear always the
scars of the conflict. Not so he. His was a harmonious, happy life, attuned
to love and beauty and peace, and aflame with joy. And for this reason it
was a fruitful and helpful life. There was no power wasted in friction or in
blind resistance. He breasted waves of difficulty like a strong, exultant
swimmer cleaving his way through the opposing element. Like some gay
knight of chivalry, he went into battle with a song. And whithersoever he
came—handsome, eager, sympathetic, debonair—he was the bringer of
gladness.
“Because he wrought in an atmosphere of joy, his life was peculiarly
fruitful and helpful. The record of what he accomplished is indeed amazing.
I do not hesitate to say that only a happy man could do so much so well.
And that same joyous spirit made him a welcome guest at every fireside and
in every heart. What a delightful companion he was! How many thousands
who never saw his face have nevertheless found in his pictures and his
books that bright companionship! Is there anything which the world needs
so deeply or welcomes so heartily as such a messenger of hope and cheer?
“In another respect this life was a boon to us. It was a simple and sincere
life, frankly and fully expressive of character. Many good and dear people
are so reserved or so disguised that their nearest friends do not know them
truly. And when we meet them, some day, in the land where we shall know
as we are known, we shall have to make acquaintance with them anew, on
the basis of the revelation of their real selves. But some there are, whose
lives express their souls. Heaven can only make more radiant in them the
features that we know already. Will Gibson will be ‘Our Will’ forever, as he
is ours to-day, though death has clothed the dear face in the strange, new
‘light that never was on land or sea.’ God be thanked for a transparent life!
“But transparent does not mean shallow. This life was deep and strong,
because it was a life of all-embracing love and sympathy, and carried the
volume and energy of that spirit, receiving also in return, to swell its own
current, the tributary recognition of a wider realm than that of the human
race. We indeed loved him, as he loved us; but there are many, thank God!
of whom so much can be said. The same principle is exhibited by few in
their relations to the non-human world of life; and when we see its
manifestations, we are astonished or incredulous. I could tell you many
stories of the magnetic attraction which this true lover exerted over wild
creatures.
“I remember that once, when Dr. Lyman Abbott was visiting him here in
Washington, he pointed out a little brown bird in a tree, just over his head,
and while he talked, in his own charming enthusiastic way, about the
markings of its plumage, reached up into the tree, took the bird from the
bough, held it in his hand to illustrate his impromptu lecture, and then
replaced it, unharmed and unaffrighted, upon its shady perch.
“Perhaps that bird, dwelling near his home, knew him already. But there
could be no such explanation of the incident which occurred far from here,
when Mr. Gibson, sitting with friends on a hotel piazza, called their
attention to a humming-bird, hovering over the flowers before them, and
saying, ‘Would you like to see him nearer?’ put out his hand, and the little
creature, who would scarcely light on a blossom, rested upon the finger of
his new friend, and submitted to the inspection of human eyes. Mr. Gibson
was himself amazed at this proof of spontaneous trust.
“He used to tell, with a sort of thankful awe, how one day, in Brooklyn,
he went through crowded, noisy streets to register his name as a voter, in
one of those barren, unattractive places which are ordinarily rented by the
State for this temporary purpose; and how, as he stood there in a group of
men, waiting for his turn, a white dove flew in from the street, circled round
the dingy room, alighted upon his shoulder, received with murmuring
delight his caresses, and then flew out. No one knew whence it came or
whither it went.
“And he told also, how once he went into the Brooklyn Library, to
examine a colored plate, representing a certain butterfly, which he wished to
reproduce in illustration of an article; and how, as he stood with the book
open before him, in the dim little corner-alcove which used to be the office
of his friend Mr. Bardwell, the librarian, a butterfly of that very species
fluttered around the great hall into the alcove, and, hovering above his head,
dropped at last upon the book, and folded its wings by the side of its own
pictures.
“We smile at such coincidences; but the fact that they happen over and
over again to one man suggests a coincidence beyond a mere accident—a
coincidence of life with life and love with answering love. Indeed, what do
we know of these wild creatures that surround us, and seem to be drawn so
easily to some of us? What have we done to lead us to know them? We
ignore them, or we chase and trap and slay them, or we imprison them and
play with them for our own amusement. How would it be if we truly and
unselfishly loved them?
“The apostle represents the whole creation as groaning and travailing in
pain, waiting for some new manifestation of the human children of God.
And the last word of our Master bids us go into all the world and tell the
glad tidings, not merely to every man, but to ‘every creature.’ Is there not,
then, an evangel of joy for those humbler companions of mankind? When
men shall have advanced so far as to cease hating and oppressing one
another, may they not still advance to a true sympathy with all living
things? And would not that make indeed a new heaven and a new earth,
populous with friendships? Of such a joyous consummation, men like our
brother whose life we celebrate to-day are prophets and forerunners. Thank
God for them!
“And they may also encourage us to stimulate a love of nature in our
growing children. We, who have formed our habits of human exclusiveness,
cannot say to ourselves in momentary enthusiasm, ‘Let us be as Will
Gibson was! Let us begin at once to cultivate the acquaintance of all living
things!’ We have outgrown the art. We stand embarrassed in the presence of
a squirrel or a bird, and, far from knowing how to attract it, are fain to be
satisfied if, by doing nothing at all, we avoid scaring it. But our children,
rightly encouraged, may develop unsuspected powers of sympathy. In the
great blessing which Mr. Gibson’s work conferred upon us all, the dear old
Master of the Gunnery, who cherished into flame the spark of his first
inspiration, lived, and still lives, to see the reward of his own loving labors.
“But in another and yet higher aspect, this life was a precious gift to us
by virtue of its strong support to our faith in immortality. If all men died in
old age, and by slow decay of strength and faculty, it might be hard to
imagine the new birth and new beginning which should rejuvenate them.
But when a vigorous, full life is withdrawn from our sight in the prime of
its power, the very momentum of it carries our faith forward with it. It is
like an arrow, shot towards the forest by a strong-armed archer. Has it
ceased to move because, in swift mid-flight, it enters the shadow and we
suddenly lose sight of it?
“ ‘The avalanche that has slid a mile will not stop for a tombstone!’
“Still another hint of immortality—and a truer one—is given by the
character developed in earthly life. Science, it is true, affords us, as yet, no
demonstration of a future life. Perhaps we shall always rest for that truth, as
we do to-day, upon the word of our Lord, who went and came so easily
between the two chambers of the Father’s house. Yet science has done much
in these later times to illuminate His declaration. It has hinted to us a God,
patient and tender through the ages of ages, carrying the world upon His
bosom and nursing its slow growth, from stage to stage, through crystal,
cell, and soul, that He might at last fill the spaces immeasurable with loving
and beloved human souls, as dear companions of Himself. He cannot
afford, it seems to us, to destroy perpetually the fairest fruits of this long
preparation. They have lain upon His heart and felt the pulse-beat of the
Universe. He is no Arabian tyrant, to slay them one by one, every morning.
Having loved His own, He loves them to the end, and beyond the seeming
end—for love is immortality. Our brother, who knew and loved every one
of God’s trees on these hills of Washington,—shall he not have access to the
Trees of Life, that grow by the River of Life? Shall his spirit, attuned
already to the divine harmonies of earth, be dumb amid the songs of
heaven? Nay; such completed souls declare the Life Eternal, echoing to us
the Master’s word of hope: ‘I live; and because I live, ye shall live also!’
“For this life of his was already a life with God. You will not
misunderstand me, if I say little of that part of his religious experience
which is common to all believers, or of that part of his work which we
technically call Christian work. It is not because I undervalue repentance,
faith in Jesus Christ, or communion and co-operation with His visible
church on earth. Still less is it because I need to make out, in
Gibson’s Grave
Washington Cemetery
behalf of one who found his religion in nature and science and art, a claim
to be considered as religious in some exceptional and peculiar way. I could
dwell on Mr. Gibson’s earnest labors as a member of our Plymouth Church
in Brooklyn, as an officer of one of our mission-schools, as a leader of its
prayer-meetings, and as a hearty supporter of all its social and religious
enterprises.
“Nor shall I speak of what he was to his dearest, in the household. Some
of us are better at home than abroad; some of us are less attractive to those
who know us best. I can only say of him, that his bright, warm, transparent
nature was the same inside his house as out of it; only, they who knew him
best received more radiance and inspiration than others. I bid them join in
our thanksgiving most heartily, who have been most highly blest. Every
stone in this beautiful dwelling, every picture on its walls, every fairer
picture seen through its windows, bears perpetual witness of his presence
and influence. And in more real and immediate truth, his spirit abides and
will abide here. I know it was said, ‘The Lord gave, and the Lord hath taken
away.’ But that was said in the old, old days, before the light celestial had
broken through the valley of the shadow of death. Now we hear a Voice,
saying, ‘Not as the world giveth, give I. What I give, I take not away!’
“But turning from these views, without underrating them, I wish to
emphasize, in addition to his love and service in church and home, Mr.
Gibson’s peculiar communion with God in nature.
“Years ago, his studio here in Washington was in the same house with
the study of Mr. Turner, then pastor of the church. It was a happy
association for both, and gave rise to many a mutual confidence. And
yesterday, talking over with me the experience of those days, Mr. Turner
spoke a deep, true word when he said, ‘I always felt concerning Mr. Gibson
that he walked with God.’
“We are accustomed to think of those saints whose communion is close
with God that they sit and meditate, or kneel and pray, or in some way
withdraw themselves from distracting sights and sounds, in order to be
alone in the Divine presence. Perhaps we do not conceive of walking with
God as one would walk with the owner of a great estate, and hear him tell
what he had done or meant to do with this field or that. We forget, perhaps,
that God is in His world, and that whoso would keep company with Him
must find Him there.
“It was of Enoch that it was first said, ‘He walked with God’; and in the
‘Book of Enoch,’ which was so popular a book in the time of Christ, and is
quoted in the New Testament, the patriarch is in fact represented as guided
by God upon a journey through the universe. It was thus that our friend
walked with God.
“He walked, the friend of every life
In flower or insect, beast or bird;
He knew their pleasure and their strife
Their sorrows shared, their secrets heard.
“Bending their leafy diadems,
The trees to him a welcome breathed;
The blossoms on a thousand stems
To him their deepest hearts unsheathed.
“The bright-eyed squirrel showed him where
Its highway ran along the fence,
And, inly glad to see him there,
Fled, not too far, in shy pretence.
“The tilting songster on the bough,
The callow nestling in its place,
With quick perception learned to know
This lover of their hunted race.
“Around him, like an angel throng,
The countless host of gauzy things,
With airy flight and murmurous song
Unfurled the glories of their wings.
“For the world’s life within him thrilled;
And every earthly path he trod
To his responsive soul was filled
With works and ways and words of God.
“Then spake a dearer voice: ‘My son,
A life yet wider shalt thou see;
Leave these fair hills of Washington
And walk on fairer hills with Me!’
“Amen! So may we walk with God!”
Other tributes were no less appreciative, and may serve as side-lights
upon his inner and personal life. They show how he impressed many men
and many minds, in various and yet concurrent ways. Mr. Clarence Deming,
speaking to the friends and graduates of the “Gunnery” school, emphasized
the traits in which he was a type of the best forces inherited from his early
training.
“And so to-night it is not Gibson the writer, Gibson the nature-lover and
nature-hunter, and Gibson the artist, whom we should be recalling, so much
as Gibson the man; and the thought persistently comes back to me over and
over again that he was our greatest Gunnery boy, not merely in reputation
before the world, not by virtue of pen and brush, but by the fact that he was
the perfect and consummate product of the old Gunnery scheme of
education, and a kind of analogue of Mr. Gunn himself. If there was one
thing sought by Mr. Gunn most strenuously it was the seeding in a boy of
those qualities which in him, as man, should fruit into that grandest trait
expressed in the English tongue by the word character. It is a subtle term,
hard to define and to expound. I can, perhaps, call it the power in man
compounded by nerve force, habit, and conscience which makes him
fearlessly righteous and sets him among his fellow-men in organized
society as a living and forceful influence, ever active for things good.
“Now, I repeat, it is on that phase of Gibson’s personality and life work
that I love to think, and to recall him as our loftiest incarnation of Gunnery
character. He, perhaps, lacked the initiative force of Mr. Gunn, but when it
came to the test of principle not even our old master surpassed the pupil. Do
you remember how outspoken Gibson was when it came to any question of
wrong? Do you recall how no form of trickery or meanness, either in
individual conduct or in public life, failed to meet his contempt and his
scorn? What one of us, in that life of his, passed, so much of it, in this
community, can put the finger on one questionable word or act? When we
can pay such tribute to a departed friend, I care not what his genius may
have been, how far and wide his fame may have blown, or how long the
mere work of hand and brain may endure, he has builded a monument set
firmer than granite or marble in the service of his generation, and of the
generations to come.
“That strong character of Gibson revealed itself to me in many ways. In
politics, for example, his path and my own on national questions often
diverged. Yet in talks with him on that subject, most impressive was the
revelation of his bed-rock sincerity of conviction; and never did that
conviction fail to be enthused with the profoundest patriotism of motive.
Take a somewhat narrower civic question, that of municipal reform, a
theme as to which by the nature of personal vocation I have heard many
men and met many and varied views. But never have I found a man who
discussed that topic more intelligently, more broadly, and more often
striking the keynote of progress than Gibson, whom the public and not a
few friends, doubtless, have associated only with the hunt for nature’s
secrets in the flower, the leaf, and the marvels of insect life.
“Or let us take one other outward expression of that strong public
character of his. It was a primal motif in such a man to love the simplicities,
and you will all remember as one vivid phase of it his intense desire to
preserve the sweet and unaffected community life which has so long
marked this village. He had seen how the wave of fashion and of assertive
and ostentatious wealth had overcast those New England towns for which
nature had done most, and how the supreme triumph of the French modiste,
the babble of the four-o’clock tea, and the vanities of so-called ‘good’
society had come to satirize the summer charms of mountain and river and
vale. Hence that aggressive desire of his, expressed alike in word and act, to
conserve in their old simplicity and freedom the customs which we as
Gunnery boys enjoyed in this gracious village. Though he be dead, that
example and precept of his yet appeal to us.
. . . . . .
“Many years ago it was my good fortune to be present in Westminster
Chapter House at a meeting to open a fund for a memorial to Dean Stanley.
Among the speakers was James Russell Lowell, then our minister at St.
James’s, and he referred to an epitaph in a Boston churchyard as descriptive
of Dean Stanley’s character. That epitaph was simply, ‘He was so pleasant.’
Many times have I reflected how well that idea described one large side of
Gibson’s nature. ‘He was so pleasant,’ so jocund, so genial, so appreciative
of humor. One outward token of the trait familiar to us all was his quick
grasp of the funny things to be found in this rural New England of ours. We
know—and by ‘we’ I mean especially those of us in middle life or beyond
—what a wealth of oddity in phrase and habit our country New Englanders
have amassed. Time was when each Yankee village had its quaint and
curious characters, but now, with education and contact with the world, they
are dying away, and the next generation will see few or none save as they
survive in literature. In personal forms Gibson rescued from oblivion many
of those characters who went into his books, but the draft was small on his
collection of Yankee epigram and oddity which never reached the types. I
can see him in memory now, with his rich gift of mimicry, repeating the
bucolic joke, or, may be, in smiling silence listening at the post-office as the
country sage expounds his original views from the bema of the barrel-head.
“Of Gibson’s sweet home life, of his love of wife and family, of his kind
hospitality, of his sacred personal friendships, it is not for me to speak in
detail here. Suffice it to say that they rounded out with rare and beautiful
symmetry that splendid life of his as artist, writer, prose-poet, investigator,
good citizen, and man. In this village of his love, so endeared to him as
summer home, and from which, as a Gunnery boy, he drew so much of
moral inspiration and strength, no vain words of mine need voice him, nor
can language of tongue or pen measure the void which he has left behind.
Washington, indeed, is not the same with Gibson gone, and has but the sad
boon of still clasping him, mother-like, on the green slope which looks off
to the valley of the sunset shadows which he loved so well. We miss, yet
meet him, in every nook, in the waving tree-tops, the swaying flower by the
rippling stream, in the butterfly that flits by in the sunlight. How well with
trifling verbal change do those lines of Whittier fit our loss:
“ ‘But still we wait with ear and eye
For something gone which should be nigh,
A loss in all familiar things,
In flower that blooms and bird that sings.
. . . . . . . . . .
And while in life’s late afternoon,
Where cool and long the shadows grow,
We walk to meet the night that soon
Shall shape and shadow overflow,
We cannot feel that thou art far,
Since near at need the angels are;
And when the sunset gates unbar,
Shall we not see thee waiting stand,
And, white against the evening star,
The welcome of thy beckoning hand?’ ”
President Almon Gunnison, of St. Lawrence University, speaking out of
a long and intimate acquaintance in Brooklyn, wrote of him, a few weeks
after his death:
“There have been few men of larger manhood than this poet-artist, this
seer and interpreter of nature. He was open-minded and trustful as a child.
He loved everything that was manly, and his sense of right was an instinct
and a passion. He was tolerant in faith and scorned all narrowness.
Reverent, worshipful, a lover of God and man. Not since Gilbert White of
Selborne died has there lived one who more minutely discerned nature, and
never has there been one more dowried to interpret her. Thoreau had equal
skill of vision and perhaps larger grace of literary expression. Burroughs
has the same order of discernment, and a like art to make nature interpret
her lessons in her own words. But Gibson was poet and artist too; he could
sing the song of the daisy with almost the melody of Burns, and could with
his deft pencil depict the highway of the squirrel so cleverly that one could
hear the echoes of its steps, and picture the hues of the flowers so that one
could almost smell the fragrance of their blossoms. He was the most
versatile of men. He was a stranger to no form of art. With pencil and with
brush, with every form of pigment, he was the master, and with the candle’s
smoke he made weird pictures which startled admiration. He was skilled in
every mechanical device. He had most curious charts with cunning
contrivances, strings and pulleys, by which he illustrated the fertilization of
plants, and would shoot the pollen and would have curious insects flying in
the air, to show how nature provided for the perpetuation of her growths.
His studio was a museum of the mechanics of art, and had he chosen he
could have excelled in many lines of inventive skill. He loved Nature in all
her variant moods and forms. There was no flower that he could not call by
name, and not a weed held the secret of its life inviolate from him. He could
answer ‘Yes’ to the poet’s question, ‘Canst thou name the birds without a
gun?’; he could go into the forest and the birds would come at his caressing
call; he could see into the very heart of every flower, and could write the
flora of every State. He loved Nature, too, in her larger forms. The
mountains awed and the sea thrilled him with their immensities. He could
set the song of the brook to music, and write out the melody of rivers in his
symphonies. How well do we remember his telling us of the book which he
would sometime make, but which, alas! he never made. It should be the
biography of the water drop, and with pencil and with words he would tell
the story of the water in its passage from the clouds to the sea.
“He would picture the clouds and the mists, the mountain-tops arresting
the fogs and condensing them with its ledges; the little springs which run
among the hills, the river’s cradle among the rocks, the tiny brook
descending over the desolation of the heights, the brooklet entering the
forest, the mossy coverts, the fern-covered banks, the shadowing trees, the
twisting, turning stream, winding downward amidst tawny rocks, jumping
over cataracts and falls, then emerging into the lower pasture slopes, with
cattle drinking at its banks, and then the meadows with great sweeping
branches of overhanging trees, the vexing wheels of mills, the larger and
larger river, and then the city with its grime, and beyond, the sea, with its
mighty ships sailing to far Cathay. And how his wondrous eyes, which had
the luminousness but never the passion of the flame, used to glow as he
talked of Nature and of the secrets that she told him and of the apostleship
he held to make the great world see and love Nature with something of his
idolatry. He kept the gladness of his youth and was never won away from
the paths in which his boyish feet had strayed. That wondrous picture-
making period of boyhood ever held his soul in thrall. He lived in the city,
for he was the busiest worker among men, but the roots of his heart were
tangled with the grasses of the sunlit pastures where his youth had been.
When the sun’s rays lengthened over the noisy city, with the swiftness of
the arrow’s flight from a Tartar’s bow he sought the old scenes, and there at
length when favoring fortune came, he built his home, and when death
wanted him she sought him there, and there she found him.”
The minute prepared for the Century Club of New York City was more
than a perfunctory record, and witnesses to the high esteem in which the
members held him:
“William Hamilton Gibson, distinguished alike as an artist, an author,
and an illustrator, had risen by unwonted industry, native talent, and a
tireless enthusiasm to a high place in the esteem of the lovers of nature and
the admirers of true art. He was recognized as an artist with the pen as well
as with the pencil, and entitled to a place among those enthusiastic
naturalists who have the skill in words to impart their enthusiasm. His
‘Highways and Byways,’ ‘Pastoral Days,’ the ‘Heart of the White
Mountains,’ ‘Nature’s Serial Story,’ ‘Camp Life in the Woods,’ ‘Trapping
and Trap Making,’ ‘Happy Hunting Grounds,’ and many other books, all
illustrated by himself, showed his scientific exactitude and his artistic
quality. His illustrated article in the last number of ‘Harper’s Magazine’
seems like a farewell message from him in another world. He was also a
noted water-colorist, and, in later years, a popular lecturer on natural
history.
“His facility of expression and ingenious illustration of his subject by his
crayon and mechanical appliances instructed and entertained his audiences,
and no man had appeared in this field since Agassiz with such success as
met him. There was a charm in his personality from the earnestness and
kindliness of his nature, and the number of those who mourn his early death
is not confined to his personal friends alone.
“Pleasant and unfading memories mingle with our regrets at parting with
those whose names are recorded here. They were men without exception
worthy, true, and of good report. May we not say, as their survivors, and
conscious of our failings—
“ ‘Our lives are albums written through,
With good or ill, with false or true,
And as the blessed angels turn
The pages of our years,
God grant they read the good with smiles
And blot the ill with tears.’
“Henry E. Howland,
”Secretary.
“Century Club House,
“New York, January 9th, 1897.”
Other phases of his versatile spirit are noted by Mr. Alexander Black:
“I first met Mr. Gibson at the Authors Club in the old rooms on Twenty-
fourth Street. At that time he was a regular attendant at the meetings, and he
remained among the faithful until his lectures began. Thereafter he came, I
fancy, whenever he was free to come, and found a stimulating enjoyment in
meeting his fellow-craftsmen, literary and artistic, with whom at all times
he had a hearty frankness of cordiality that made him an always-welcome
figure in this singularly democratic group. At times I found him pulling at a
‘long Tom,’ generally, as he put it, ‘in self-defense,’ for we hovered in a
deep fog of smoke. After I myself had been elected to the Club (in 1888) we
met regularly in this literary aerie, and endured in common the recurrent
jest inflicted upon those who, at two A.M., still had to make a homeward
journey to Brooklyn,—an infliction which fell lightly upon me when I had
his company to the Bridge, and could hear him talk of the flowers and their
insect visitors, or the current movements of art.
“I believe he always retained an affectionate feeling for the Twenty-
fourth Street quarters of the Club, where we smoked, ate the Captain’s
salad, told stories (Gibson not a poor contributor), seldom talked shop, and
certainly never were literary; where we met Lowell, Stedman, Boyesen,
Eggleston, Grant White, Godwin, Stoddard, Conway, Jefferson, Riley,
Kipling, Mitchell, Hay, St. Gaudens—it would be a long and an interesting
list. Mr. Gibson’s genius and personality alike attracted to him the attention
of the choicest spirits in a gathering of this kind. He always had a fine fund
of that quality which belongs to genius—which is in itself a genius—a
quality of youthful enjoyment in the simpler pleasures. I remember the
contagious gusto with which, on a certain memorable Watch Night, he told
the company a ghost story that came to its crisis in a materialized ghost of
his own making which he had concealed under his coat. The hoax recalls
some of his fun at Washington village, where his astonishing mummy with
a message from the past will long be a droll tradition, and where there is a
lively recollection of his dashing horsemanship on a wonderful steed with a
feather-duster tail!
“I heard him lecture at Washington village and shared in the delight of an
audience whose youngest members he held quite as closely as their elders.
Indeed, I never have known in any department of science or of art an
enthusiast who could convey, with an utter absence of academic formality,
so rich and delightful a fund of information and suggestion. To me he was
always the ideal interpreter of nature. There was no hint of book covers
between. He did not turn to and from his theme at any time. It was part of
his life—and plainly a pleasant, unstrenuous part of it. In the woods, in his
garden, on the quiet porch overlooking the hillside sumac, he spoke of a
discovery in a petal or in the habits of a beetle with that charming
undidactic delight of one who assumes that all must have a common
pleasure in these phases of natural life.
“As an artist he was quite as free from personal mannerisms or
eccentricities. When I first visited his studio on Montague street, Brooklyn,
he talked as he worked—the picture was an illustration to one of his
magazine papers,—and afterwards turned to his portfolio, quite without the
effect of entertaining me, but always with a companionly frankness and
simplicity that made him at all times the most attractive of hosts. I
remember his house studio on Lincoln Place by but two visits, and I had no
greater acquaintance with the little crib at the foot of the Washington lawn. I
think I liked the dishevelled workshop at Washington best of all.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
Let us accompany you on the journey of exploring knowledge and
personal growth!
ebookultra.com
Ad

More Related Content

Similar to C programming from problem analysis to program design 4th ed Edition D S Malik (20)

(Original PDF) C++ Programming From Problem Analysis to Program Design 8th
(Original PDF) C++ Programming From Problem Analysis to Program Design 8th(Original PDF) C++ Programming From Problem Analysis to Program Design 8th
(Original PDF) C++ Programming From Problem Analysis to Program Design 8th
betueljpseph
 
(eBook PDF) C++ How to Program 10th Edition by Paul J. Deitel
(eBook PDF) C++ How to Program 10th Edition by Paul J. Deitel(eBook PDF) C++ How to Program 10th Edition by Paul J. Deitel
(eBook PDF) C++ How to Program 10th Edition by Paul J. Deitel
yonilkares
 
(Original PDF) C++ Programming From Problem Analysis to Program Design 8th
(Original PDF) C++ Programming From Problem Analysis to Program Design 8th(Original PDF) C++ Programming From Problem Analysis to Program Design 8th
(Original PDF) C++ Programming From Problem Analysis to Program Design 8th
uzeirshiji
 
(Original PDF) C++ Programming From Problem Analysis to Program Design 8th
(Original PDF) C++ Programming From Problem Analysis to Program Design 8th(Original PDF) C++ Programming From Problem Analysis to Program Design 8th
(Original PDF) C++ Programming From Problem Analysis to Program Design 8th
gallopteteh
 
Salim_Ahmed_gp_latest
Salim_Ahmed_gp_latestSalim_Ahmed_gp_latest
Salim_Ahmed_gp_latest
Mohammad Salim Ahmed
 
DataMind: An e-learning platform for Data Analysis based on R. RBelgium meetu...
DataMind: An e-learning platform for Data Analysis based on R. RBelgium meetu...DataMind: An e-learning platform for Data Analysis based on R. RBelgium meetu...
DataMind: An e-learning platform for Data Analysis based on R. RBelgium meetu...
DataMind-slides
 
Programming.pdf
Programming.pdfProgramming.pdf
Programming.pdf
Md. Ashraf Uddin
 
Fundamentals of Data Structures Unit 1.pptx
Fundamentals of Data Structures Unit 1.pptxFundamentals of Data Structures Unit 1.pptx
Fundamentals of Data Structures Unit 1.pptx
Vigneshkumar Ponnusamy
 
Intake_35_Professional_Developer_Track_SD
Intake_35_Professional_Developer_Track_SDIntake_35_Professional_Developer_Track_SD
Intake_35_Professional_Developer_Track_SD
RaNa HaSan
 
Intake_35_Professional_Developer_Track_SD
Intake_35_Professional_Developer_Track_SDIntake_35_Professional_Developer_Track_SD
Intake_35_Professional_Developer_Track_SD
RaNa HaSan
 
Intake_35_Professional_Developer_Track_SD
Intake_35_Professional_Developer_Track_SDIntake_35_Professional_Developer_Track_SD
Intake_35_Professional_Developer_Track_SD
Mohamed Bayomi
 
e3f55595181f7cad006f26db820fb78ec146e00e-1646623528083 (1).pdf
e3f55595181f7cad006f26db820fb78ec146e00e-1646623528083 (1).pdfe3f55595181f7cad006f26db820fb78ec146e00e-1646623528083 (1).pdf
e3f55595181f7cad006f26db820fb78ec146e00e-1646623528083 (1).pdf
SILVIUSyt
 
IRJET- Online Programming Assessment and Evaluation Platform in Education System
IRJET- Online Programming Assessment and Evaluation Platform in Education SystemIRJET- Online Programming Assessment and Evaluation Platform in Education System
IRJET- Online Programming Assessment and Evaluation Platform in Education System
IRJET Journal
 
Essential C 8 0 7th Edition Mark Michaelis Kevin Bost Editor Eric Lippert Editor
Essential C 8 0 7th Edition Mark Michaelis Kevin Bost Editor Eric Lippert EditorEssential C 8 0 7th Edition Mark Michaelis Kevin Bost Editor Eric Lippert Editor
Essential C 8 0 7th Edition Mark Michaelis Kevin Bost Editor Eric Lippert Editor
horinbranex1
 
Learn data science with r programming
Learn data science with r programmingLearn data science with r programming
Learn data science with r programming
KeshavSain2
 
Learn data science with r programming (1)
Learn data science with r programming (1)Learn data science with r programming (1)
Learn data science with r programming (1)
Sagag55
 
Learn data science with r programming
Learn data science with r programmingLearn data science with r programming
Learn data science with r programming
RonikSharma1
 
Learn data science with r programming
Learn data science with r programmingLearn data science with r programming
Learn data science with r programming
Nikhilsharma1159
 
C++ How to Program 10th Edition Deitel Solutions Manual
C++ How to Program 10th Edition Deitel Solutions ManualC++ How to Program 10th Edition Deitel Solutions Manual
C++ How to Program 10th Edition Deitel Solutions Manual
payotbrocks
 
Cs 568 Spring 10 Lecture 5 Estimation
Cs 568 Spring 10  Lecture 5 EstimationCs 568 Spring 10  Lecture 5 Estimation
Cs 568 Spring 10 Lecture 5 Estimation
Lawrence Bernstein
 
(Original PDF) C++ Programming From Problem Analysis to Program Design 8th
(Original PDF) C++ Programming From Problem Analysis to Program Design 8th(Original PDF) C++ Programming From Problem Analysis to Program Design 8th
(Original PDF) C++ Programming From Problem Analysis to Program Design 8th
betueljpseph
 
(eBook PDF) C++ How to Program 10th Edition by Paul J. Deitel
(eBook PDF) C++ How to Program 10th Edition by Paul J. Deitel(eBook PDF) C++ How to Program 10th Edition by Paul J. Deitel
(eBook PDF) C++ How to Program 10th Edition by Paul J. Deitel
yonilkares
 
(Original PDF) C++ Programming From Problem Analysis to Program Design 8th
(Original PDF) C++ Programming From Problem Analysis to Program Design 8th(Original PDF) C++ Programming From Problem Analysis to Program Design 8th
(Original PDF) C++ Programming From Problem Analysis to Program Design 8th
uzeirshiji
 
(Original PDF) C++ Programming From Problem Analysis to Program Design 8th
(Original PDF) C++ Programming From Problem Analysis to Program Design 8th(Original PDF) C++ Programming From Problem Analysis to Program Design 8th
(Original PDF) C++ Programming From Problem Analysis to Program Design 8th
gallopteteh
 
DataMind: An e-learning platform for Data Analysis based on R. RBelgium meetu...
DataMind: An e-learning platform for Data Analysis based on R. RBelgium meetu...DataMind: An e-learning platform for Data Analysis based on R. RBelgium meetu...
DataMind: An e-learning platform for Data Analysis based on R. RBelgium meetu...
DataMind-slides
 
Fundamentals of Data Structures Unit 1.pptx
Fundamentals of Data Structures Unit 1.pptxFundamentals of Data Structures Unit 1.pptx
Fundamentals of Data Structures Unit 1.pptx
Vigneshkumar Ponnusamy
 
Intake_35_Professional_Developer_Track_SD
Intake_35_Professional_Developer_Track_SDIntake_35_Professional_Developer_Track_SD
Intake_35_Professional_Developer_Track_SD
RaNa HaSan
 
Intake_35_Professional_Developer_Track_SD
Intake_35_Professional_Developer_Track_SDIntake_35_Professional_Developer_Track_SD
Intake_35_Professional_Developer_Track_SD
RaNa HaSan
 
Intake_35_Professional_Developer_Track_SD
Intake_35_Professional_Developer_Track_SDIntake_35_Professional_Developer_Track_SD
Intake_35_Professional_Developer_Track_SD
Mohamed Bayomi
 
e3f55595181f7cad006f26db820fb78ec146e00e-1646623528083 (1).pdf
e3f55595181f7cad006f26db820fb78ec146e00e-1646623528083 (1).pdfe3f55595181f7cad006f26db820fb78ec146e00e-1646623528083 (1).pdf
e3f55595181f7cad006f26db820fb78ec146e00e-1646623528083 (1).pdf
SILVIUSyt
 
IRJET- Online Programming Assessment and Evaluation Platform in Education System
IRJET- Online Programming Assessment and Evaluation Platform in Education SystemIRJET- Online Programming Assessment and Evaluation Platform in Education System
IRJET- Online Programming Assessment and Evaluation Platform in Education System
IRJET Journal
 
Essential C 8 0 7th Edition Mark Michaelis Kevin Bost Editor Eric Lippert Editor
Essential C 8 0 7th Edition Mark Michaelis Kevin Bost Editor Eric Lippert EditorEssential C 8 0 7th Edition Mark Michaelis Kevin Bost Editor Eric Lippert Editor
Essential C 8 0 7th Edition Mark Michaelis Kevin Bost Editor Eric Lippert Editor
horinbranex1
 
Learn data science with r programming
Learn data science with r programmingLearn data science with r programming
Learn data science with r programming
KeshavSain2
 
Learn data science with r programming (1)
Learn data science with r programming (1)Learn data science with r programming (1)
Learn data science with r programming (1)
Sagag55
 
Learn data science with r programming
Learn data science with r programmingLearn data science with r programming
Learn data science with r programming
RonikSharma1
 
Learn data science with r programming
Learn data science with r programmingLearn data science with r programming
Learn data science with r programming
Nikhilsharma1159
 
C++ How to Program 10th Edition Deitel Solutions Manual
C++ How to Program 10th Edition Deitel Solutions ManualC++ How to Program 10th Edition Deitel Solutions Manual
C++ How to Program 10th Edition Deitel Solutions Manual
payotbrocks
 
Cs 568 Spring 10 Lecture 5 Estimation
Cs 568 Spring 10  Lecture 5 EstimationCs 568 Spring 10  Lecture 5 Estimation
Cs 568 Spring 10 Lecture 5 Estimation
Lawrence Bernstein
 

Recently uploaded (20)

YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
"Basics of Heterocyclic Compounds and Their Naming Rules"
"Basics of Heterocyclic Compounds and Their Naming Rules""Basics of Heterocyclic Compounds and Their Naming Rules"
"Basics of Heterocyclic Compounds and Their Naming Rules"
rupalinirmalbpharm
 
03#UNTAGGED. Generosity in architecture.
03#UNTAGGED. Generosity in architecture.03#UNTAGGED. Generosity in architecture.
03#UNTAGGED. Generosity in architecture.
MCH
 
Presentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem KayaPresentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem Kaya
MIPLM
 
dynastic art of the Pallava dynasty south India
dynastic art of the Pallava dynasty south Indiadynastic art of the Pallava dynasty south India
dynastic art of the Pallava dynasty south India
PrachiSontakke5
 
Real GitHub Copilot Exam Dumps for Success
Real GitHub Copilot Exam Dumps for SuccessReal GitHub Copilot Exam Dumps for Success
Real GitHub Copilot Exam Dumps for Success
Mark Soia
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 4-30-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 4-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-30-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
Sinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_NameSinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_Name
keshanf79
 
Grade 2 - Mathematics - Printable Worksheet
Grade 2 - Mathematics - Printable WorksheetGrade 2 - Mathematics - Printable Worksheet
Grade 2 - Mathematics - Printable Worksheet
Sritoma Majumder
 
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
larencebapu132
 
SPRING FESTIVITIES - UK AND USA -
SPRING FESTIVITIES - UK AND USA            -SPRING FESTIVITIES - UK AND USA            -
SPRING FESTIVITIES - UK AND USA -
Colégio Santa Teresinha
 
To study Digestive system of insect.pptx
To study Digestive system of insect.pptxTo study Digestive system of insect.pptx
To study Digestive system of insect.pptx
Arshad Shaikh
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...
BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...
BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...
Nguyen Thanh Tu Collection
 
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - WorksheetCBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
Sritoma Majumder
 
Grade 3 - English - Printable Worksheet (PDF Format)
Grade 3 - English - Printable Worksheet  (PDF Format)Grade 3 - English - Printable Worksheet  (PDF Format)
Grade 3 - English - Printable Worksheet (PDF Format)
Sritoma Majumder
 
Exercise Physiology MCQS By DR. NASIR MUSTAFA
Exercise Physiology MCQS By DR. NASIR MUSTAFAExercise Physiology MCQS By DR. NASIR MUSTAFA
Exercise Physiology MCQS By DR. NASIR MUSTAFA
Dr. Nasir Mustafa
 
2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx
contactwilliamm2546
 
"Basics of Heterocyclic Compounds and Their Naming Rules"
"Basics of Heterocyclic Compounds and Their Naming Rules""Basics of Heterocyclic Compounds and Their Naming Rules"
"Basics of Heterocyclic Compounds and Their Naming Rules"
rupalinirmalbpharm
 
03#UNTAGGED. Generosity in architecture.
03#UNTAGGED. Generosity in architecture.03#UNTAGGED. Generosity in architecture.
03#UNTAGGED. Generosity in architecture.
MCH
 
Presentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem KayaPresentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem Kaya
MIPLM
 
dynastic art of the Pallava dynasty south India
dynastic art of the Pallava dynasty south Indiadynastic art of the Pallava dynasty south India
dynastic art of the Pallava dynasty south India
PrachiSontakke5
 
Real GitHub Copilot Exam Dumps for Success
Real GitHub Copilot Exam Dumps for SuccessReal GitHub Copilot Exam Dumps for Success
Real GitHub Copilot Exam Dumps for Success
Mark Soia
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
Sinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_NameSinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_Name
keshanf79
 
Grade 2 - Mathematics - Printable Worksheet
Grade 2 - Mathematics - Printable WorksheetGrade 2 - Mathematics - Printable Worksheet
Grade 2 - Mathematics - Printable Worksheet
Sritoma Majumder
 
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
larencebapu132
 
To study Digestive system of insect.pptx
To study Digestive system of insect.pptxTo study Digestive system of insect.pptx
To study Digestive system of insect.pptx
Arshad Shaikh
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...
BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...
BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...
Nguyen Thanh Tu Collection
 
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - WorksheetCBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
Sritoma Majumder
 
Grade 3 - English - Printable Worksheet (PDF Format)
Grade 3 - English - Printable Worksheet  (PDF Format)Grade 3 - English - Printable Worksheet  (PDF Format)
Grade 3 - English - Printable Worksheet (PDF Format)
Sritoma Majumder
 
Exercise Physiology MCQS By DR. NASIR MUSTAFA
Exercise Physiology MCQS By DR. NASIR MUSTAFAExercise Physiology MCQS By DR. NASIR MUSTAFA
Exercise Physiology MCQS By DR. NASIR MUSTAFA
Dr. Nasir Mustafa
 
2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx
contactwilliamm2546
 
Ad

C programming from problem analysis to program design 4th ed Edition D S Malik

  • 1. Visit https://ebookultra.com to download the full version and explore more ebooks or textbooks C programming from problem analysis to program design 4th ed Edition D S Malik _____ Click the link below to download _____ https://ebookultra.com/download/c-programming-from-problem- analysis-to-program-design-4th-ed-edition-d-s-malik/ Explore and download more ebooks or textbooks at ebookultra.com
  • 2. Here are some recommended products that we believe you will be interested in. You can click the link to download. Java TM Programming From Problem Analysis to Program Design 5th Edition D. S. Malik https://ebookultra.com/download/java-tm-programming-from-problem- analysis-to-program-design-5th-edition-d-s-malik/ Problem Solving and Program Design in C Third Edition Jeri R. Hanly https://ebookultra.com/download/problem-solving-and-program-design-in- c-third-edition-jeri-r-hanly/ Introduction to Numerical Analysis 2nd Edition D. C. Sanyal https://ebookultra.com/download/introduction-to-numerical- analysis-2nd-edition-d-c-sanyal/ Visual C 2010 How to Program 4th Edition 1 29 pdf Paul Deitel https://ebookultra.com/download/visual-c-2010-how-to-program-4th- edition-1-29-pdf-paul-deitel/
  • 3. Analysis and Design of Analog Integrated Circuits 4th ed Edition Paul R. Gray https://ebookultra.com/download/analysis-and-design-of-analog- integrated-circuits-4th-ed-edition-paul-r-gray/ Programming and Problem Solving with C Comprehensive Comprehensive Edition Nell B. Dale https://ebookultra.com/download/programming-and-problem-solving-with- c-comprehensive-comprehensive-edition-nell-b-dale/ C how to program Tenth Edition Deitel https://ebookultra.com/download/c-how-to-program-tenth-edition-deitel/ Programming C 2nd ed Edition Jesse Liberty https://ebookultra.com/download/programming-c-2nd-ed-edition-jesse- liberty/ C Programming in Linux 1st edition Edition Haskins D. https://ebookultra.com/download/c-programming-in-linux-1st-edition- edition-haskins-d/
  • 5. C programming from problem analysis to program design 4th ed Edition D S Malik Digital Instant Download Author(s): D S Malik ISBN(s): 9781423902096, 1423902092 Edition: 4th ed File Details: PDF, 11.47 MB Year: 2009 Language: english
  • 6. C++ PROGRAMMING: FROM PROBLEM ANALYSIS TO PROGRAM DESIGN FOURTH EDITION D.S. MALIK Australia Brazil Japan Korea Mexico Singapore Spain United Kingdom United States
  • 7. C++ Programming: From Problem Analysis to Program Design, Fourth Edition by D.S. Malik Senior Product Manager: Alyssa Pratt Acquisitions Editor: Amy Jollymore Content Product Manager: Jill Braiewa Marketing Manager: Bryant Chrzan Editorial Assistant: Patrick Frank Print Buyer: Julio Esperas Cover Designer: Lisa Kuhn, Curio Press, LLC Compositor: Integra Art Director: Marissa Falco Validation: Green Pen Quality Assurance Proofreader: Green Pen Quality Assurance Indexer: Liz Cunningham Printed in Canada 1 2 3 4 5 6 7 14 13 12 11 10 09 08 ª 2009 Course Technology, Cengage Learning ALL RIGHTS RESERVED. No part of this work covered by the copyright herein may be reproduced, transmitted, stored or used in any form or by any means graphic, electronic, or mechanical, including but not limited to photocopying, recording, scanning, digitizing, taping, Web distribution, information networks, or information storage and retrieval systems, except as permitted under Section 107 or 108 of the 1976 United States Copyright Act, without the prior written permission of the publisher. For product information and technology assistance, contact us at Cengage Learning Customer Sales Support, 1-800-354-9706 For permission to use material from this text or product, submit all requests online at cengage.com/permissions Further permissions questions can be emailed to [email protected] ISBN-13: 978-1-4239-0209-6 ISBN-10: 1-4239-0209-2 Course Technology 25 Thomson Place Boston, MA 02210 USA Visual C++ .NET and PowerPoint are registered trademarks of the Microsoft Corporation; Pentium is a registered trademark of Intel Corporation; IBM is a registered trademark of Industrial Business Machines. Disclaimer Course Technology reserves the right to revise this publication and make changes from time to time in its content without notice. The programs in this book are for instructional purposes only. They have been tested with care, but are not guaranteed for any particular intent beyond educational purposes. The authors and the publisher do not offer any warranties or representations, nor do they accept any liabilities with respect to the programs. Cengage Learning is a leading provider of customized learning solutions with office locations around the globe, including Singapore, the United Kingdom, Australia, Mexico, Brazil, and Japan. Locate your local office at: international.cengage.com/region Cengage Learning products are represented in Canada by Nelson Education, Ltd. For your lifelong learning solutions, visit course.cengage.com Visit our corporate website at cengage.com
  • 10. PREFACE xxvii 1. An Overview of Computers and Programming Languages 1 2. Basic Elements of C++ 29 3. Input/Output 115 4. Control Structures I (Selection) 167 5. Control Structures II (Repetition) 231 6. User-Defined Functions I 307 7. User-Defined Functions II 345 8. User-Defined Simple Data Types, Namespaces, and the string Type 415 9. Arrays and Strings 469 10. Applications of Arrays (Searching and Sorting) and the vector Type 545 11. Records (structs) 603 12. Classes and Data Abstraction 641 13. Inheritance and Composition 717 14. Pointers, Classes, Virtual Functions, and Abstract Classes 785 15. Overloading and Templates 853 16. Exception Handling 943 17. Recursion 981 18. Linked Lists 1017 19. Stacks and Queues 1111 BRIEF CONTENTS
  • 11. APPENDIX A Reserved Words 1219 APPENDIX B Operator Precedence 1221 APPENDIX C Character Sets 1223 APPENDIX D Operator Overloading 1227 APPENDIX E Additional C++ Topics 1229 APPENDIX F Header Files 1251 APPENDIX G Memory Size on a System and Random Number Generator 1261 APPENDIX H Standard Template Library (STL) 1263 APPENDIX I Answers to Odd-Numbered Exercises 1305 INDEX 1327 vi | C++ Programming: From Problem Analysis to Program Design, Fourth Edition
  • 12. Preface xxvii AN OVERVIEW OF COMPUTERS AND PROGRAMMING LANGUAGES 1 Introduction 2 A Brief Overview of the History of Computers 2 Elements of a Computer System 3 Hardware 4 Central Processing Unit 4 Main Memory 5 Secondary Storage 6 Input /Output Devices 6 Software 6 The Language of a Computer 6 The Evolution of Programming Languages 8 A C++ Program 10 Processing a C++ Program 12 Programming with the Problem Analysis–Coding–Execution Cycle 14 Programming Methodologies 22 Structured Programming 22 Object-Oriented Programming 22 ANSI/ISO Standard C++ 24 Quick Review 24 Exercises 26 1 TABLE OF CONTENTS
  • 13. BASIC ELEMENTS OF C++ 29 The Basics of a C++ Program 30 Comments 32 Special Symbols 32 Reserved Words (Keywords) 33 Identifiers 33 Whitespaces 34 Data Types 34 Simple Data Types 35 Floating-Point Data Types 38 Arithmetic Operators and Operator Precedence 40 Order of Precedence 44 Expressions 45 Mixed Expressions 46 Type Conversion (Casting) 48 string Type 50 Input 51 Allocating Memory with Constants and Variables 52 Putting Data into Variables 54 Assignment Statement 54 Saving and Using the Value of an Expression 58 Declaring and Initializing Variables 59 Input (Read) Statement 60 Variable Initialization 63 Increment and Decrement Operators 67 Output 69 Preprocessor Directives 77 namespace and Using cin and cout in a Program 78 Using the string Data Type in a Program 78 Creating a C++ Program 79 Program Style and Form 83 Syntax 83 2 Use of Blanks 84 viii | C++ Programming: From Problem Analysis to Program Design, Fourth Edition
  • 14. Use of Semicolons, Brackets, and Commas 84 Semantics 84 Naming Identifiers 84 Prompt Lines 85 Documentation 86 Form and Style 86 More on Assignment Statements 88 Programming Example: Convert Length 99 Programming Example: Make Change 93 Quick Review 97 Exercises 99 Programming Exercises 107 INPUT/OUTPUT 115 I/O Streams and Standard I/O Devices 116 cin and the Extraction Operator 117 Using Predefined Functions in a Program 123 cin and the get Function 125 cin and the ignore Function 126 The putback and peek Functions 128 The Dot Notation Between I/O Stream Variables and I/O Functions: A Precaution 130 Input Failure 131 The clear Function 133 Output and Formatting Output 135 setprecision Manipulator 135 fixed Manipulator 136 showpoint Manipulator 136 setw 138 Additional Output Formatting Tools 141 setfill Manipulator 141 left and right Manipulators 143 3 Input/Output and the string Type 145 Table of Contents | ix
  • 15. File Input/Output 146 Programming Example: Movie Ticket Sale and Donation to Charity 150 Programming Example: Student Grade 155 Quick Review 158 Exercises 160 Programming Exercises 163 CONTROL STRUCTURES I (SELECTION) 167 Control Structures 168 Relational Operators 169 Relational Operators and Simple Data Types 171 Comparing Floating-point Numbers for equality 171 Comparing Characters 172 Relational Operators and the string Type 173 Logical (Boolean) Operators and Logical Expressions 175 Order of Precedence 177 Short-Circuit Evaluation 181 int Data Type and Logical (Boolean) Expressions 182 bool Data Type and Logical (Boolean) Expressions 183 Selection: if and if...else 184 One-Way Selection 185 Two-Way Selection 187 Compound (Block of) Statements 191 Multiple Selections: Nested if 192 Comparing if...else Statements with a Series of if Statements 196 Using Pseudocode to Develop, Test, and Debug a Program 196 Input Failure and the if Statement 199 Confusion Between the Equality Operator (==) and the Assignment Operator (=) 202 Conditional Operator (?:) 203 4 switch Structures 204 x | C++ Programming: From Problem Analysis to Program Design, Fourth Edition
  • 16. Terminating a Program with the assert Function 211 Programming Example: Cable Company Billing 213 Quick Review 219 Exercises 220 Programming Exercises 225 CONTROL STRUCTURES II (REPETITION) 231 Why Is Repetition Needed? 232 while Looping (Repetition) Structure 233 Designing while loops 235 Case 1: Counter-Controlled while Loops 236 Case 2: Sentinel-Controlled while Loops 239 Case 3: Flag-Controlled while Loops 243 Case 4: EOF-Controlled while Loops 247 eof Function 248 More on Expressions in while Statements 249 Programming Example: Checking Account Balance 250 Programming Example: Fibonacci Number 259 for Looping (Repetition) Structure 264 Programming Example: Classifying Numbers 270 do...while Looping (Repetition) Structure 274 Choosing the Right Looping Structure 278 break and continue Statements 278 Nested Control Structures 281 Quick Review 288 Exercises 290 Programming Exercises 300 5 Table of Contents | xi
  • 17. USER-DEFINED FUNCTIONS I 307 Predefined Functions 308 User-Defined Functions 311 Value-Returning Functions 312 Syntax: Value-Returning Functions 314 Syntax: Formal Parameter List 314 Function Call 314 Syntax: Actual Parameter List 314 return Statement 315 Syntax: return Statement 315 Function Prototype 318 Syntax: Function Prototype 319 Flow of Execution 325 Programming Example: Largest Number 326 Programming Example: Cable Company 327 Quick Review 333 Exercises 335 Programming Exercises 340 USER-DEFINED FUNCTIONS II 345 Void Functions 346 Void Functions without Parameters 346 Void Functions with Parameters 349 Value Parameters 354 Reference Variables as Parameters 356 Value and Reference Parameters and Memory Allocation 360 Reference Parameters and Value-Returning Functions 370 Scope of an Identifier 370 Global Variables, Named Constants, and Side Effects 374 Static and Automatic Variables 376 6 7 xii | C++ Programming: From Problem Analysis to Program Design, Fourth Edition
  • 18. Function Overloading: An Introduction 378 Functions with Default Parameters 380 Programming Example: Classify Numbers 383 Programming Example: Data Comparison 388 Quick Review 398 Exercises 400 Programming Exercises 407 USER-DEFINED SIMPLE DATA TYPES, NAMESPACES, AND THE string TYPE 415 Enumeration Type 416 Declaring Variables 418 Assignment 418 Operations on Enumeration Types 419 Relational Operators 419 Input /Output of Enumeration Types 420 Functions and Enumeration Types 422 Declaring Variables When Defining the Enumeration Type 424 Anonymous Data Types 424 typedef Statement 425 Programming Example: The Game of Rock, Paper, and Scissors 426 Namespaces 437 string Type 442 Additional string Operations 446 length Function 446 size Function 448 find Function 449 substr Function 452 swap Function 454 Programming Example: Pig Latin Strings 454 8 Quick Review 460 Table of Contents | xiii
  • 19. Exercises 463 Programming Exercises 466 ARRAYS AND STRINGS 469 Arrays 471 Accessing Array Components 472 Processing One-Dimensional Arrays 475 Array Index Out of Bounds 479 Array Initialization During Declaration 480 Partial Initialization of Arrays During Declaration 480 Some Restrictions on Array Processing 481 Arrays as Parameters to Functions 482 Constant Arrays as Formal Parameters 483 Base Address of an Array and Array in Computer Memory 485 Functions Cannot Return a Value of the Type Array 488 Integral Data Type and Array Indices 491 Other Ways to Declare Arrays 491 C-strings (Character Arrays) 492 String Comparison 494 Reading and Writing Strings 496 String Input 496 String Output 497 Specifying Input/Output Files at Execution Time 498 string Type and Input/Output Files 498 Parallel Arrays 499 Two- and Multidimensional Arrays 500 Accessing Array Components 502 Two-Dimensional Array Initialization During Declaration 503 Two-Dimensional Arrays and Enumeration Types 503 Initialization 507 Print 507 Input 507 Sum by Row 508 Sum by Column 508 9 xiv | C++ Programming: From Problem Analysis to Program Design, Fourth Edition
  • 20. Largest Element in Each Row and Each Column 508 Reversing Diagonal 509 Passing Two-Dimensional Arrays as Parameters to Functions 511 Arrays of Strings 514 Arrays of Strings and the string Type 514 Arrays of Strings and C-Strings (Character Arrays) 515 Another Way to Declare a Two-Dimensional Array 516 Multidimensional Arrays 517 Programming Example: Code Detection 518 Programming Example: Text Processing 525 Quick Review 532 Exercises 534 Programming Exercises 539 APPLICATIONS OF ARRAYS (SEARCHING AND SORTING) AND THE vector TYPE 545 List Processing 546 Searching 546 Bubble Sort 551 Selection Sort 555 Insertion Sort 559 Sequential Search on an Ordered List 566 Binary Search 569 Performance of Binary Search 572 vector Type (class) 574 Programming Example: Election Results 579 Quick Review 595 Exercises 597 Programming Exercises 600 10 Table of Contents | xv
  • 21. RECORDS (structS) 603 Records (structs) 604 Accessing struct Members 606 Assignment 608 Comparison (Relational Operators) 609 Input /Output 610 struct Variables and Functions 610 Arrays versus structs 611 Arrays in structs 612 structs in Arrays 614 structs within a struct 617 Programming Example: Sales Data Analysis 621 Quick Review 635 Exercises 635 Programming Exercises 637 CLASSES AND DATA ABSTRACTION 641 Classes 642 Unified Modeling Language Class Diagrams 645 Variable (Object) Declaration 646 Accessing Class Members 647 Built-in Operations on Classes 648 Assignment Operator and Classes 649 Class Scope 650 Functions and Classes 650 Reference Parameters and Class Objects (Variables) 650 Implementation of Member Functions 651 Accessor and Mutator Functions 656 Order of public and private Members of a Class 661 Constructors 662 Invoking a Constructor 664 Invoking the Default Constructor 664 Invoking a Constructor with Parameters 665 Constructors and Default Parameters 668 11 12 xvi | C++ Programming: From Problem Analysis to Program Design, Fourth Edition
  • 22. Classes and Constructors: A Precaution 670 Arrays of Class Objects (Variables) and Constructors 671 Destructors 673 Data Abstraction, Classes, and Abstract Data Types 674 A struct versus a class 676 Information Hiding 677 Executable Code 681 Static Members of a Class 685 Programming Example: Candy Machine 691 Quick Review 706 Exercises 708 Programming Exercises 713 INHERITANCE AND COMPOSITION 717 Inheritance 718 Redefining (Overriding) Member Functions of the Base Class 721 Constructors of Derived and Base Classes 728 Multiple Inclusions of a Header File 736 C++ Stream Classes 738 Protected Members of a Class 739 Inheritance as public, protected, or private 739 Composition 743 Object-Oriented Design (OOD) and Object-Oriented Programming (OOP) 748 Identifying Classes, Objects, and Operations 750 Programming Example: Grade Report 751 Quick Review 772 Exercises 773 Programming Exercises 779 13 Table of Contents | xvii
  • 23. POINTERS, CLASSES, VIRTUAL FUNCTIONS, AND ABSTRACT CLASSES 785 Pointer Data Type and Pointer Variables 786 Declaring Pointer Variables 786 Address of Operator () 787 Dereferencing Operator (*) 788 Classes, Structs, and Pointer Variables 794 Initializing Pointer Variables 797 Dynamic Variables 797 Operator new 798 Operator delete 799 Operations on Pointer Variables 801 Dynamic Arrays 803 Functions and Pointers 806 Pointers and Function Return Values 806 Dynamic Two-Dimensional Arrays 807 Shallow versus Deep Copy and Pointers 810 Classes and Pointers: Some Peculiarities 812 Destructor 813 Assignment Operator 814 Copy Constructor 816 Inheritance, Pointers, and Virtual Functions 823 Classes and Virtual Destructors 830 Abstract Classes and Pure Virtual Functions 830 Address of Operator and Classes 838 Quick Review 841 Exercises 844 Programming Exercises 851 14 xviii | C++ Programming: From Problem Analysis to Program Design, Fourth Edition
  • 24. OVERLOADING AND TEMPLATES 853 Why Operator Overloading Is Needed 854 Operator Overloading 855 Syntax for Operator Functions 856 Overloading an Operator: Some Restrictions 856 Pointer this 857 Friend Functions of Classes 862 Operator Functions as Member Functions and Nonmember Functions 865 Overloading Binary Operators 868 Overloading the Stream Insertion () and Extraction () Operators 874 Overloading the Assignment Operator (=) 879 Overloading Unary Operators 887 Operator Overloading: Member versus Nonmember 893 Classes and Pointer Member Variables (Revisited) 894 Operator Overloading: One Final Word 894 Programming Example: clockType 894 Programming Example: Complex Numbers 903 Overloading the Array Index (Subscript) Operator ([]) 908 Programming Example: newString 910 Function Overloading 916 Templates 917 Function Templates 917 Class Templates 919 Quick Review 927 Exercises 929 Programming Exercises 934 EXCEPTION HANDLING 943 Handling Exceptions within a Program 944 C++ Mechanisms of Exception Handling 948 15 16 Table of Contents | xix
  • 25. try/catch Block 948 Using C++ Exception Classes 955 Creating Your Own Exception Classes 959 Rethrowing and Throwing an Exception 965 Exception Handling Techniques 970 Terminate the Program 970 Fix the Error and Continue 970 Log the Error and Continue 972 Stack Unwinding 972 Quick Review 976 Exercises 978 Programming Exercises 980 RECURSION 981 Recursive Definitions 982 Direct and Indirect Recursion 985 Infinite Recursion 985 Problem Solving Using Recursion 986 Tower of Hanoi: Analysis 997 Recursion or Iteration? 998 Programming Example: Converting a Number from Binary to Decimal 999 Programming Example: Converting a Number from Decimal to Binary 1004 Quick Review 1008 Exercises 1009 Programming Exercises 1012 LINKED LISTS 1017 Linked Lists 1018 Linked Lists: Some Properties 1019 17 Building a Linked List 1028 18 xx | C++ Programming: From Problem Analysis to Program Design, Fourth Edition
  • 26. Other documents randomly have different content
  • 27. said, implied liberty. Men should not turn their hearts to Christ through fear but through love. The God that has been and is still preached in the churches throughout the land, is not a god but a devil. If he could picture a monster the most horrible and cruel imaginable it would be the God which is preached in many of our churches and to thousands of our people. He maintained his utter independence, and said that no man could say to him what he should do or what he should not do, he was responsible to God alone, and if he was inspired to preach the gospel to his people he would do it with all his heart and all his soul and would give utterance to every thought he chose. ‘Men say I shall not, I say I shall.’ Christianity, he said, had been trampled under foot by the spirit of ecclesiastical authority, that the time was approaching when liberty in the church was to rule triumphant and until it did the world would suffer. “His voice rose very high and it was altogether the most eloquent effort he has ever made in this pulpit,—and is so conceded by all whom I have spoken with. I never saw Mr. Beecher when he appeared happier and healthier than now. “It had been almost decided to send him away on a six months’ vacation for rest, but he to-day refused to take it, saying that he did not need it and would rather stay at home with his people as ‘they needed his preaching and he needed to preach.’ I am going to call on him soon.” To attempt to enumerate the authors and the artists, the critics and the clergymen, the naturalists and the nature “amateurs” with whom he was on friendly and even intimate terms would be to make a long catalogue of the most eminent men of his time. It would include such names as Stedman and Stoddard, Beard and Murphy, Abbott and Ludlow, Burroughs and Roe and Ellwanger, Parsons and Alden and the Egglestons. His correspondence included men and women from all over the world. His genius appealed to men of all classes and pursuits—to all who had the simple heart of childhood and its open eye. And that genius was so full of the vitality of the individual, so warm with his own personality, that to admire him as artist or naturalist was to be drawn to him as a man. He seemed to come to people as a friendly interpreter and as a helpful friend, unlocking new gates outward into nature’s life, disclosing new horizons, telling new secrets of the Cosmos. The tone of the letters he received from hundreds of unknown admirers shows that he was everywhere held as a personal friend, a teacher who won at once the attention, the admiration, and the love of his disciples.
  • 28. Two letters from correspondents curiously remote from each other are types of the hundreds who were drawn by the human spirit of his writings to ply him with questions, or overwhelm him with appreciation and gratitude. From the confines of civilization on the north to the boundary of the nation on the south, the friends whom he had made by his pencil and his pen, his art and his scientific knowledge, appealed to him with an instinctive feeling that he would understand them, welcome them, help them if he could. Nor were they ever disappointed. The first letter is from bleak Anticosti Island: “The Lighthouse, “South West Point, “13th May, 1895. “Dear Mr. Gibson: “We hesitated a long time before coming to you with this question. We knew that so many must worry you in the same way, and yet we have come at last like the rest. I can only hope you will forgive us. We live on Anticosti, an island with a very bad name in the Gulf of St. Lawrence. I know you never heard a good word of it. I must beg you, though, to believe that it is as much belied as the toadstools you championed last year. Its woods and plains are full of treasures and among them goodly stores of those same toadstools. They were all under the ban, though, as in other places and we dared only look at them regretfully. “You don’t know how glad we were when you broke the spell in ‘Harper’s’ last summer. I don’t think anybody else was so glad. You know we live alone here and try to make friends of ‘all out-doors’ and anything like this means more to us than to most people. “For a while then we were happy. We knew you and we had faith enough in ourselves to believe that we were able to understand anything you wrote for everyday folks, let alone something that led them among deadly poisons. But very soon we began to fret. Nearly every toadstool we met near home was a Russula and generally far larger and more delicious- looking than anything else we could find far or near. “They went through every shade of redness and pinkness and pepperiness. I should be afraid to say how often I vowed with pricking lips that I would taste no more. Some ‘were not so very red or so very peppery’ and then ‘how very far Mr. Gibson must be keeping on the safe side for the
  • 29. sake of stupid people.’ I tried cooking some of them though I felt in my heart that they were the same as the rest and found them very good. But every one was, and very reasonably, shy of them. “At this critical time we came across the article enclosed. “Here was another excitement. But who was Charles McIlvaine? ‘He knows what he is talking about anyway,’ I said, ‘and I am going to try the whole red tribe’; and I did. “They were all he said and after a while the others took courage and we even gave some to a friend who had discovered the common mushroom for us. “I felt misgivings all through the winter, though, about the coming season. I did not want to risk unpleasantness and ‘emeticus’ is such a very ominous name. And who was McIlvaine, after all? Wasn’t it rash to listen to him? “And lo and behold you talk now in the ‘Bazar’ of Captain Charles McIlvaine the eminent mycologist! “Did you know that he said all that about the Russula? If we follow his advice what risk do we run of making people ill? We don’t mind so much about ourselves but we must think a little more of our guests. They are rare enough without poisoning any of them. “Please give us just a little word of advice, anything you find time to say. And please, even if you cannot excuse this liberty and cannot say anything, send me back the newspaper cutting. “I never intended to say all this when I began and feel quite ashamed when I look back at the length of my letter. Hoping that you will excuse it, believe me with warmest thanks and gratitude, “Yours faithfully, “Grace Pope. “W. Hamilton Gibson, Esq., “New York.” The second letter, a few years before, came from the extreme southwest: “San Antonio, Texas, “Jan’y 13th, 1892.
  • 30. “My dear Mr. Gibson: “Will you pardon me, an entire stranger, and a Texan writing to you, but I want to tell you how much I have enjoyed and profited by reading your ‘Sharp Eyes.’ A good friend sent it from Denver as a Xmas remembrance and each night I read some portion because it is a never failing delight to read of my many familiar friends in Nature you describe in such a clear and delightful manner. Knowing your time is valuable and you are of human patience, though you have the young lover of Nature at heart, I am tempted to ask you to solve for me a problem that has been not only a mystery for several years but an actual annoyance not to be able to find a satisfactory explanation. It is this. Often in winter time we see flies and mosquitoes swollen almost to bursting attached to panes of glass, their little bodies oftentimes striped like a yellow wasp’s and surrounding them and attached to the glass is a misty deposit of some kind. It is the cause and object of this misty deposit I seek. If you will enlighten me upon this subject by explanation or reference you will add only one more favor to a large number. “That you have been the means of adding greatly to the pleasure and instruction of the present generation, young and old, I see from my limited field of observation. That you may be spared many years to continue your good work and enjoy the pleasures of God’s Nature in this world and reap a rich reward in the Life hereafter is the earnest wish of “Your sincere admirer, “Archibald A. Alexander.” One could add to these indefinitely. A minister in the northwest, a lover of flowers and a true woodsman, has a fine program for a canoeing trip on Minnesota rivers and lakes; a farmer’s wife writes to ask direction to some simple manual which will help her copy flowers in color, and encloses some examples of her simple work; an admiring poet sends some verses which will not scan, and will be glad to have her adulations published,— and remuneration secured; another admirer insists that he is not an autograph fiend,—but he would like a letter in reply to his praises; an impecunious poet suggests an immediate loan of ten dollars; a mother in a western state sends some admirable sketches done by her daughter and wishes his judgment upon their merits. People felt his kindly nature in his
  • 31. writings and in his pictures. It was a virtue that went out of him, and drew like a loadstone. Nowhere, perhaps, outside the charmed and privileged circle of the “Gunnery” boys,—they were always “boys” and “girls” to one another!— was he more welcome or more warmly cherished than at the Authors Club. He counted it a great honor to be chosen into that favored circle, and as he was one of its earliest members, so he was one of its most constant and loyal supporters. Whenever he could he joined in its social conclaves and its decorous revels; and his presence was always a guarantee of good fellowship, unconstrained, talkative, and sparkling. In the earliest home of the Club in East Fifteenth St.; in its rooms in West Twenty-fourth St.; later in the West Twenty-third St. quarters; and finally in the soaring apartments to which it attained, Gibson’s was one of the familiar figures, as it was one of those most commonly sought out of strangers. But it was never a figure with “a certain solitariness,” as seen by his imaginative critic. Wherever Gibson sat or stood, there was sure to be a group. Men gathered about him as birds flock to the banks of a rippling stream. Nor was he any slower in coming to the side of others. He sought companionship as frankly as he gave it. He was always running over with bright, attractive talk; but he had a willing ear. He was conscious of his power to attract; but it never bred in him the slightest condescension toward others. He was passionately fond of wit, and humor, and all the honest fun of life; but he never showed a particle of coarseness, and he never confounded fun with foulness. He was as much at home with the largest minds and characters as he was with the simple farmers and rustics, he delighted to describe; for he met all men on the ground of their common brotherhood,
  • 32. The Edge of the Woods From a Painting and had no absurd consciousness of external condition and accidental differences to embarrass him. His reverence and his religiousness were profound elements of his nature. He was no formalist. Probably he did not set a very high value upon some of the externals of spiritual life which seem so important to many men. He was, indeed, a loyal supporter of religious works and enterprises, as he was a member of the visible church; and he paid the highest respect to all that pertained to what is commonly demanded as a mark of Christian life and interest. But he had a life in the Spirit which was larger and broader than all that. He felt and he loved the Divine Life in all that he saw, and heard, and studied, and tried to draw and paint, in the world around him. To his thinking it was all the expression of God; as such he reverenced the creation. Through this world of nature he was always seeing and feeling the Father. His letters breathe a note of honest devoutness which passes all lip-service. And scattered through his pages are frequent expressions of a spirituality deeper than any words or phrases which so easily become cant. There is a deep revelation of the heart of the man in a passage in “Woodnotes.” Listen to his soul pouring itself out in these words:
  • 33. “Sitting alone in the woods I have sometimes known a moment of such supreme exaltation that I have almost questioned my sanity—a spirit and an impulse which I would no more attempt to frame into words than I should think to define the Deity himself—‘I am glad to the brink of fear.’ My own identity is a mystery. The presence of the dearest friend on earth would be an unwelcome intrusion. The pulses of the woods beat through me. The joyous flight of bird brings buoyant memories, the linnet’s song now seems swelling in my own throat. Happy Donatello in the garden of the Borghese is no longer a myth, though even he knew no such joy as this. At such times —and are they not vouchsafed to every true ‘Holy-Lander’?—I am conscious of an unwonted sympathy in nature—a strange, double, paradoxical existence, which, while lifting me to the clouds, still holds me to the earth.” It was this inner soul of nature as it filled the inner soul of the man, which he felt a growing power to express in art. But before he could speak his message he passed from our presence.
  • 34. F CHAPTER IX AFTERGLOW OR many months preceding the summer of 1896, Mr. Gibson had felt himself failing in health. The strain of his long lecture-tours told seriously upon his strength, and several times he suffered from fainting attacks and vertigo, sometimes in the very presence of his audiences. When he withdrew from the city in the early summer, it was with a knowledge that his health was impaired, and the hope, as well, that in Washington, at “The Sumacs,” he would find the quiet and the rest which would restore the tone of his system and repair the wastes of excessive work. But this hope was not to be fulfilled. He himself was depressed and apprehensive, and his friends shared his fears. A slight improvement seemed to come with midsummer, but proved illusory. On Thursday evening, the 16th of July, he left his home to go after his mail at the village post-office. Meeting a number of friends and acquaintances he sat down outside the office for a chat with them. He appeared to be in excellent spirits, and for an hour was quite himself. Then he turned to a gentleman beside him and asked if there was anything wrong about his speech. He said his voice seemed thick, and that he could not articulate plainly. A book he held in his hand dropped to the floor several times, and he seemed unable to retain his hold of it. Being asked if he felt ill, he said that he did, and suggested that he should walk to the residence of Dr. Ford. His friends prevailed upon him to remain quiet, and one of their number hurried for medical aid. Drs. Ford and Brown soon arrived, and they did all in their power for their patient. A wagon was soon brought to the door, and Mr. Gibson was placed in a chair in the wagon, but before they had reached his beautiful home, “The Sumacs,” he had ceased breathing, and upon the friends who had accompanied him was thrown the task of breaking the sad news to his wife and children. On Sunday, the 19th, occurred the funeral services, a tender and sympathetic account of which was given in “Plymouth Chimes.” “The village of Washington, Connecticut, has been made famous by the ‘Gunnery’ School, and by Mr. Gibson, its illustrious pupil, who received
  • 35. within its walls the inspiration of his career. The forests, thickets, and hillsides of that picturesque region furnished the favorite subjects of his pencil and pen; and, after he had achieved professional success, he established at Washington, among the friends of his boyhood, his country home. Everybody there knew and loved him, and was proud of him. And when death suddenly came to him, it was felt to be an element of mercy in the shock of sorrow, that he was struck down in the midst of happy intercourse with his neighbors. “The funeral service, held on Sunday afternoon, July 19th, at his residence, ‘The Sumacs,’ was keyed throughout to triumph and thanksgiving, rather than gloom. The day was bright and cool; birds sang about the house; wild flowers and green branches filled all available spaces; and the crowd of neighbors sat in the pleasant rooms or out on the porch beyond the open door. “The Scripture, read by Mr. Carter, the Washington pastor, comprised passages descriptive of the glory of God in nature, and of the triumph and rest of the saints. The prayer, by Mr. Turner (formerly pastor at Washington, and now chaplain at the Hampton Institute, in Virginia), was similarly attuned to solemn exultation. The hymns (favorites of Mr. Gibson) were ‘Love Divine,’ ‘Abide with Me,’ and ‘Upward Where the Stars are Burning’—the last sung exquisitely as a solo; the two others, with scarcely less tender sweetness, by the whole company. “The address, by his life-long friend, Dr. R. W. Raymond, was, from beginning to end, an expression of gratitude rather than grief. It enumerated the features of the victorious, happy, fruitful, sincere, loving, and devout life which had been sent as a blessing and inspiration among men. Several anecdotes were related, illustrative of Mr. Gibson’s sympathy with all living things, and of the surprising way in which it was recognized and reciprocated. “It was told, for instance, how he could take a wild bird from the branch of a tree, caress it, and return it unharmed and unfrightened; how strange birds would fly to him and light upon his shoulder; and how even butterflies seemed to be attracted to him. “The address closed with a beautiful poem, written for the occasion by Dr. Raymond.
  • 36. “Through shady roads the funeral procession of carriages and pedestrians passed to the loveliest spot in Washington, the burial-ground, which occupies the side of a hill, commanding a prospect of forest and meadow, stream and mountain, full of peace and beauty. The grave was lined with green branches and fringed with goldenrod; and after a hymn ‘The Home-land’ and a prayer, the casket was gently lowered into this bower of rest. And then, under the benediction of the sunset, the mortal body of William Hamilton Gibson was left to its repose.” The fine word spoken by Dr. Raymond on this occasion is one which should have a lasting place among the memorials of his friend. It was in such entire harmony with the spirit of the hour, with the memories which were uppermost, with the sense of loss, and the still deeper sense of life enriched and The Village Green Washington, Connecticut brightened by the earthly work which was ended, that it was instantly recognized as at once synopsis and echo of Gibson’s career. Dr. Raymond said: “I count it a great privilege to stand here this day, and utter the love and sorrow of so many souls. Words are but feeble expedients for such a task; yet there is, in one respect, a significant choice of words. Shall we express grief or gratitude? Shall we measure our loss by the vacancy it has left
  • 37. behind, or count with joy the treasure we have had, giving God thanks that we had it so long and so abundantly? For my part, I would not desecrate with the wailing of grief this sky of Sabbath peace, or that face of serene triumph and repose. Let us measure our love and our sorrow, then, in terms of gratitude. Thanks be to God for the unspeakable gift to us of a victorious, happy, fruitful, helpful, sincere, loving, devout, inspired life, which, once received among us, we can never lose. Even the nearest and dearest and most bitterly bereaved can comfort grief with gratitude. “I say it was a victorious life. I knew William Hamilton Gibson when he was a boy; and I knew the struggle of his early life, when, impelled by an irresistible impulse towards art, and nature as its inspiration, he steadily pursued that ideal, “not disobedient to the heavenly vision,’ until, in spite of the warnings of the would-be wise, and the carpings of the would-be critical, he won for himself a recognition of his genius and the love and thanks of multitudes whose lives he had enriched and exalted by his work. He accomplished what he set out to do; and I say his victorious life is in that respect a blessing to us, as showing for our encouragement, in these days of change and failure, that a man may still be lord of his circumstances, and, as in the affairs of the heart, so also in the affairs of business, may win and wear his first love. “But some men gain their victories at heavy cost, and bear always the scars of the conflict. Not so he. His was a harmonious, happy life, attuned to love and beauty and peace, and aflame with joy. And for this reason it was a fruitful and helpful life. There was no power wasted in friction or in blind resistance. He breasted waves of difficulty like a strong, exultant swimmer cleaving his way through the opposing element. Like some gay knight of chivalry, he went into battle with a song. And whithersoever he came—handsome, eager, sympathetic, debonair—he was the bringer of gladness. “Because he wrought in an atmosphere of joy, his life was peculiarly fruitful and helpful. The record of what he accomplished is indeed amazing. I do not hesitate to say that only a happy man could do so much so well. And that same joyous spirit made him a welcome guest at every fireside and in every heart. What a delightful companion he was! How many thousands who never saw his face have nevertheless found in his pictures and his books that bright companionship! Is there anything which the world needs so deeply or welcomes so heartily as such a messenger of hope and cheer?
  • 38. “In another respect this life was a boon to us. It was a simple and sincere life, frankly and fully expressive of character. Many good and dear people are so reserved or so disguised that their nearest friends do not know them truly. And when we meet them, some day, in the land where we shall know as we are known, we shall have to make acquaintance with them anew, on the basis of the revelation of their real selves. But some there are, whose lives express their souls. Heaven can only make more radiant in them the features that we know already. Will Gibson will be ‘Our Will’ forever, as he is ours to-day, though death has clothed the dear face in the strange, new ‘light that never was on land or sea.’ God be thanked for a transparent life! “But transparent does not mean shallow. This life was deep and strong, because it was a life of all-embracing love and sympathy, and carried the volume and energy of that spirit, receiving also in return, to swell its own current, the tributary recognition of a wider realm than that of the human race. We indeed loved him, as he loved us; but there are many, thank God! of whom so much can be said. The same principle is exhibited by few in their relations to the non-human world of life; and when we see its manifestations, we are astonished or incredulous. I could tell you many stories of the magnetic attraction which this true lover exerted over wild creatures. “I remember that once, when Dr. Lyman Abbott was visiting him here in Washington, he pointed out a little brown bird in a tree, just over his head, and while he talked, in his own charming enthusiastic way, about the markings of its plumage, reached up into the tree, took the bird from the bough, held it in his hand to illustrate his impromptu lecture, and then replaced it, unharmed and unaffrighted, upon its shady perch. “Perhaps that bird, dwelling near his home, knew him already. But there could be no such explanation of the incident which occurred far from here, when Mr. Gibson, sitting with friends on a hotel piazza, called their attention to a humming-bird, hovering over the flowers before them, and saying, ‘Would you like to see him nearer?’ put out his hand, and the little creature, who would scarcely light on a blossom, rested upon the finger of his new friend, and submitted to the inspection of human eyes. Mr. Gibson was himself amazed at this proof of spontaneous trust. “He used to tell, with a sort of thankful awe, how one day, in Brooklyn, he went through crowded, noisy streets to register his name as a voter, in
  • 39. one of those barren, unattractive places which are ordinarily rented by the State for this temporary purpose; and how, as he stood there in a group of men, waiting for his turn, a white dove flew in from the street, circled round the dingy room, alighted upon his shoulder, received with murmuring delight his caresses, and then flew out. No one knew whence it came or whither it went. “And he told also, how once he went into the Brooklyn Library, to examine a colored plate, representing a certain butterfly, which he wished to reproduce in illustration of an article; and how, as he stood with the book open before him, in the dim little corner-alcove which used to be the office of his friend Mr. Bardwell, the librarian, a butterfly of that very species fluttered around the great hall into the alcove, and, hovering above his head, dropped at last upon the book, and folded its wings by the side of its own pictures. “We smile at such coincidences; but the fact that they happen over and over again to one man suggests a coincidence beyond a mere accident—a coincidence of life with life and love with answering love. Indeed, what do we know of these wild creatures that surround us, and seem to be drawn so easily to some of us? What have we done to lead us to know them? We ignore them, or we chase and trap and slay them, or we imprison them and play with them for our own amusement. How would it be if we truly and unselfishly loved them? “The apostle represents the whole creation as groaning and travailing in pain, waiting for some new manifestation of the human children of God. And the last word of our Master bids us go into all the world and tell the glad tidings, not merely to every man, but to ‘every creature.’ Is there not, then, an evangel of joy for those humbler companions of mankind? When men shall have advanced so far as to cease hating and oppressing one another, may they not still advance to a true sympathy with all living things? And would not that make indeed a new heaven and a new earth, populous with friendships? Of such a joyous consummation, men like our brother whose life we celebrate to-day are prophets and forerunners. Thank God for them! “And they may also encourage us to stimulate a love of nature in our growing children. We, who have formed our habits of human exclusiveness, cannot say to ourselves in momentary enthusiasm, ‘Let us be as Will
  • 40. Gibson was! Let us begin at once to cultivate the acquaintance of all living things!’ We have outgrown the art. We stand embarrassed in the presence of a squirrel or a bird, and, far from knowing how to attract it, are fain to be satisfied if, by doing nothing at all, we avoid scaring it. But our children, rightly encouraged, may develop unsuspected powers of sympathy. In the great blessing which Mr. Gibson’s work conferred upon us all, the dear old Master of the Gunnery, who cherished into flame the spark of his first inspiration, lived, and still lives, to see the reward of his own loving labors. “But in another and yet higher aspect, this life was a precious gift to us by virtue of its strong support to our faith in immortality. If all men died in old age, and by slow decay of strength and faculty, it might be hard to imagine the new birth and new beginning which should rejuvenate them. But when a vigorous, full life is withdrawn from our sight in the prime of its power, the very momentum of it carries our faith forward with it. It is like an arrow, shot towards the forest by a strong-armed archer. Has it ceased to move because, in swift mid-flight, it enters the shadow and we suddenly lose sight of it? “ ‘The avalanche that has slid a mile will not stop for a tombstone!’ “Still another hint of immortality—and a truer one—is given by the character developed in earthly life. Science, it is true, affords us, as yet, no demonstration of a future life. Perhaps we shall always rest for that truth, as we do to-day, upon the word of our Lord, who went and came so easily between the two chambers of the Father’s house. Yet science has done much in these later times to illuminate His declaration. It has hinted to us a God, patient and tender through the ages of ages, carrying the world upon His bosom and nursing its slow growth, from stage to stage, through crystal, cell, and soul, that He might at last fill the spaces immeasurable with loving and beloved human souls, as dear companions of Himself. He cannot afford, it seems to us, to destroy perpetually the fairest fruits of this long preparation. They have lain upon His heart and felt the pulse-beat of the Universe. He is no Arabian tyrant, to slay them one by one, every morning. Having loved His own, He loves them to the end, and beyond the seeming end—for love is immortality. Our brother, who knew and loved every one of God’s trees on these hills of Washington,—shall he not have access to the Trees of Life, that grow by the River of Life? Shall his spirit, attuned already to the divine harmonies of earth, be dumb amid the songs of
  • 41. heaven? Nay; such completed souls declare the Life Eternal, echoing to us the Master’s word of hope: ‘I live; and because I live, ye shall live also!’ “For this life of his was already a life with God. You will not misunderstand me, if I say little of that part of his religious experience which is common to all believers, or of that part of his work which we technically call Christian work. It is not because I undervalue repentance, faith in Jesus Christ, or communion and co-operation with His visible church on earth. Still less is it because I need to make out, in Gibson’s Grave Washington Cemetery behalf of one who found his religion in nature and science and art, a claim to be considered as religious in some exceptional and peculiar way. I could dwell on Mr. Gibson’s earnest labors as a member of our Plymouth Church in Brooklyn, as an officer of one of our mission-schools, as a leader of its prayer-meetings, and as a hearty supporter of all its social and religious enterprises. “Nor shall I speak of what he was to his dearest, in the household. Some of us are better at home than abroad; some of us are less attractive to those who know us best. I can only say of him, that his bright, warm, transparent nature was the same inside his house as out of it; only, they who knew him best received more radiance and inspiration than others. I bid them join in
  • 42. our thanksgiving most heartily, who have been most highly blest. Every stone in this beautiful dwelling, every picture on its walls, every fairer picture seen through its windows, bears perpetual witness of his presence and influence. And in more real and immediate truth, his spirit abides and will abide here. I know it was said, ‘The Lord gave, and the Lord hath taken away.’ But that was said in the old, old days, before the light celestial had broken through the valley of the shadow of death. Now we hear a Voice, saying, ‘Not as the world giveth, give I. What I give, I take not away!’ “But turning from these views, without underrating them, I wish to emphasize, in addition to his love and service in church and home, Mr. Gibson’s peculiar communion with God in nature. “Years ago, his studio here in Washington was in the same house with the study of Mr. Turner, then pastor of the church. It was a happy association for both, and gave rise to many a mutual confidence. And yesterday, talking over with me the experience of those days, Mr. Turner spoke a deep, true word when he said, ‘I always felt concerning Mr. Gibson that he walked with God.’ “We are accustomed to think of those saints whose communion is close with God that they sit and meditate, or kneel and pray, or in some way withdraw themselves from distracting sights and sounds, in order to be alone in the Divine presence. Perhaps we do not conceive of walking with God as one would walk with the owner of a great estate, and hear him tell what he had done or meant to do with this field or that. We forget, perhaps, that God is in His world, and that whoso would keep company with Him must find Him there. “It was of Enoch that it was first said, ‘He walked with God’; and in the ‘Book of Enoch,’ which was so popular a book in the time of Christ, and is quoted in the New Testament, the patriarch is in fact represented as guided by God upon a journey through the universe. It was thus that our friend walked with God.
  • 43. “He walked, the friend of every life In flower or insect, beast or bird; He knew their pleasure and their strife Their sorrows shared, their secrets heard. “Bending their leafy diadems, The trees to him a welcome breathed; The blossoms on a thousand stems To him their deepest hearts unsheathed. “The bright-eyed squirrel showed him where Its highway ran along the fence, And, inly glad to see him there, Fled, not too far, in shy pretence. “The tilting songster on the bough, The callow nestling in its place, With quick perception learned to know This lover of their hunted race. “Around him, like an angel throng, The countless host of gauzy things, With airy flight and murmurous song Unfurled the glories of their wings. “For the world’s life within him thrilled; And every earthly path he trod To his responsive soul was filled With works and ways and words of God. “Then spake a dearer voice: ‘My son, A life yet wider shalt thou see; Leave these fair hills of Washington And walk on fairer hills with Me!’ “Amen! So may we walk with God!” Other tributes were no less appreciative, and may serve as side-lights upon his inner and personal life. They show how he impressed many men and many minds, in various and yet concurrent ways. Mr. Clarence Deming, speaking to the friends and graduates of the “Gunnery” school, emphasized
  • 44. the traits in which he was a type of the best forces inherited from his early training. “And so to-night it is not Gibson the writer, Gibson the nature-lover and nature-hunter, and Gibson the artist, whom we should be recalling, so much as Gibson the man; and the thought persistently comes back to me over and over again that he was our greatest Gunnery boy, not merely in reputation before the world, not by virtue of pen and brush, but by the fact that he was the perfect and consummate product of the old Gunnery scheme of education, and a kind of analogue of Mr. Gunn himself. If there was one thing sought by Mr. Gunn most strenuously it was the seeding in a boy of those qualities which in him, as man, should fruit into that grandest trait expressed in the English tongue by the word character. It is a subtle term, hard to define and to expound. I can, perhaps, call it the power in man compounded by nerve force, habit, and conscience which makes him fearlessly righteous and sets him among his fellow-men in organized society as a living and forceful influence, ever active for things good. “Now, I repeat, it is on that phase of Gibson’s personality and life work that I love to think, and to recall him as our loftiest incarnation of Gunnery character. He, perhaps, lacked the initiative force of Mr. Gunn, but when it came to the test of principle not even our old master surpassed the pupil. Do you remember how outspoken Gibson was when it came to any question of wrong? Do you recall how no form of trickery or meanness, either in individual conduct or in public life, failed to meet his contempt and his scorn? What one of us, in that life of his, passed, so much of it, in this community, can put the finger on one questionable word or act? When we can pay such tribute to a departed friend, I care not what his genius may have been, how far and wide his fame may have blown, or how long the mere work of hand and brain may endure, he has builded a monument set firmer than granite or marble in the service of his generation, and of the generations to come. “That strong character of Gibson revealed itself to me in many ways. In politics, for example, his path and my own on national questions often diverged. Yet in talks with him on that subject, most impressive was the revelation of his bed-rock sincerity of conviction; and never did that conviction fail to be enthused with the profoundest patriotism of motive. Take a somewhat narrower civic question, that of municipal reform, a theme as to which by the nature of personal vocation I have heard many
  • 45. men and met many and varied views. But never have I found a man who discussed that topic more intelligently, more broadly, and more often striking the keynote of progress than Gibson, whom the public and not a few friends, doubtless, have associated only with the hunt for nature’s secrets in the flower, the leaf, and the marvels of insect life. “Or let us take one other outward expression of that strong public character of his. It was a primal motif in such a man to love the simplicities, and you will all remember as one vivid phase of it his intense desire to preserve the sweet and unaffected community life which has so long marked this village. He had seen how the wave of fashion and of assertive and ostentatious wealth had overcast those New England towns for which nature had done most, and how the supreme triumph of the French modiste, the babble of the four-o’clock tea, and the vanities of so-called ‘good’ society had come to satirize the summer charms of mountain and river and vale. Hence that aggressive desire of his, expressed alike in word and act, to conserve in their old simplicity and freedom the customs which we as Gunnery boys enjoyed in this gracious village. Though he be dead, that example and precept of his yet appeal to us. . . . . . . “Many years ago it was my good fortune to be present in Westminster Chapter House at a meeting to open a fund for a memorial to Dean Stanley. Among the speakers was James Russell Lowell, then our minister at St. James’s, and he referred to an epitaph in a Boston churchyard as descriptive of Dean Stanley’s character. That epitaph was simply, ‘He was so pleasant.’ Many times have I reflected how well that idea described one large side of Gibson’s nature. ‘He was so pleasant,’ so jocund, so genial, so appreciative of humor. One outward token of the trait familiar to us all was his quick grasp of the funny things to be found in this rural New England of ours. We know—and by ‘we’ I mean especially those of us in middle life or beyond —what a wealth of oddity in phrase and habit our country New Englanders have amassed. Time was when each Yankee village had its quaint and curious characters, but now, with education and contact with the world, they are dying away, and the next generation will see few or none save as they survive in literature. In personal forms Gibson rescued from oblivion many of those characters who went into his books, but the draft was small on his collection of Yankee epigram and oddity which never reached the types. I can see him in memory now, with his rich gift of mimicry, repeating the
  • 46. bucolic joke, or, may be, in smiling silence listening at the post-office as the country sage expounds his original views from the bema of the barrel-head. “Of Gibson’s sweet home life, of his love of wife and family, of his kind hospitality, of his sacred personal friendships, it is not for me to speak in detail here. Suffice it to say that they rounded out with rare and beautiful symmetry that splendid life of his as artist, writer, prose-poet, investigator, good citizen, and man. In this village of his love, so endeared to him as summer home, and from which, as a Gunnery boy, he drew so much of moral inspiration and strength, no vain words of mine need voice him, nor can language of tongue or pen measure the void which he has left behind. Washington, indeed, is not the same with Gibson gone, and has but the sad boon of still clasping him, mother-like, on the green slope which looks off to the valley of the sunset shadows which he loved so well. We miss, yet meet him, in every nook, in the waving tree-tops, the swaying flower by the rippling stream, in the butterfly that flits by in the sunlight. How well with trifling verbal change do those lines of Whittier fit our loss: “ ‘But still we wait with ear and eye For something gone which should be nigh, A loss in all familiar things, In flower that blooms and bird that sings. . . . . . . . . . . And while in life’s late afternoon, Where cool and long the shadows grow, We walk to meet the night that soon Shall shape and shadow overflow, We cannot feel that thou art far, Since near at need the angels are; And when the sunset gates unbar, Shall we not see thee waiting stand, And, white against the evening star, The welcome of thy beckoning hand?’ ” President Almon Gunnison, of St. Lawrence University, speaking out of a long and intimate acquaintance in Brooklyn, wrote of him, a few weeks after his death: “There have been few men of larger manhood than this poet-artist, this seer and interpreter of nature. He was open-minded and trustful as a child. He loved everything that was manly, and his sense of right was an instinct
  • 47. and a passion. He was tolerant in faith and scorned all narrowness. Reverent, worshipful, a lover of God and man. Not since Gilbert White of Selborne died has there lived one who more minutely discerned nature, and never has there been one more dowried to interpret her. Thoreau had equal skill of vision and perhaps larger grace of literary expression. Burroughs has the same order of discernment, and a like art to make nature interpret her lessons in her own words. But Gibson was poet and artist too; he could sing the song of the daisy with almost the melody of Burns, and could with his deft pencil depict the highway of the squirrel so cleverly that one could hear the echoes of its steps, and picture the hues of the flowers so that one could almost smell the fragrance of their blossoms. He was the most versatile of men. He was a stranger to no form of art. With pencil and with brush, with every form of pigment, he was the master, and with the candle’s smoke he made weird pictures which startled admiration. He was skilled in every mechanical device. He had most curious charts with cunning contrivances, strings and pulleys, by which he illustrated the fertilization of plants, and would shoot the pollen and would have curious insects flying in the air, to show how nature provided for the perpetuation of her growths. His studio was a museum of the mechanics of art, and had he chosen he could have excelled in many lines of inventive skill. He loved Nature in all her variant moods and forms. There was no flower that he could not call by name, and not a weed held the secret of its life inviolate from him. He could answer ‘Yes’ to the poet’s question, ‘Canst thou name the birds without a gun?’; he could go into the forest and the birds would come at his caressing call; he could see into the very heart of every flower, and could write the flora of every State. He loved Nature, too, in her larger forms. The mountains awed and the sea thrilled him with their immensities. He could set the song of the brook to music, and write out the melody of rivers in his symphonies. How well do we remember his telling us of the book which he would sometime make, but which, alas! he never made. It should be the biography of the water drop, and with pencil and with words he would tell the story of the water in its passage from the clouds to the sea. “He would picture the clouds and the mists, the mountain-tops arresting the fogs and condensing them with its ledges; the little springs which run among the hills, the river’s cradle among the rocks, the tiny brook descending over the desolation of the heights, the brooklet entering the forest, the mossy coverts, the fern-covered banks, the shadowing trees, the
  • 48. twisting, turning stream, winding downward amidst tawny rocks, jumping over cataracts and falls, then emerging into the lower pasture slopes, with cattle drinking at its banks, and then the meadows with great sweeping branches of overhanging trees, the vexing wheels of mills, the larger and larger river, and then the city with its grime, and beyond, the sea, with its mighty ships sailing to far Cathay. And how his wondrous eyes, which had the luminousness but never the passion of the flame, used to glow as he talked of Nature and of the secrets that she told him and of the apostleship he held to make the great world see and love Nature with something of his idolatry. He kept the gladness of his youth and was never won away from the paths in which his boyish feet had strayed. That wondrous picture- making period of boyhood ever held his soul in thrall. He lived in the city, for he was the busiest worker among men, but the roots of his heart were tangled with the grasses of the sunlit pastures where his youth had been. When the sun’s rays lengthened over the noisy city, with the swiftness of the arrow’s flight from a Tartar’s bow he sought the old scenes, and there at length when favoring fortune came, he built his home, and when death wanted him she sought him there, and there she found him.” The minute prepared for the Century Club of New York City was more than a perfunctory record, and witnesses to the high esteem in which the members held him: “William Hamilton Gibson, distinguished alike as an artist, an author, and an illustrator, had risen by unwonted industry, native talent, and a tireless enthusiasm to a high place in the esteem of the lovers of nature and the admirers of true art. He was recognized as an artist with the pen as well as with the pencil, and entitled to a place among those enthusiastic naturalists who have the skill in words to impart their enthusiasm. His ‘Highways and Byways,’ ‘Pastoral Days,’ the ‘Heart of the White Mountains,’ ‘Nature’s Serial Story,’ ‘Camp Life in the Woods,’ ‘Trapping and Trap Making,’ ‘Happy Hunting Grounds,’ and many other books, all illustrated by himself, showed his scientific exactitude and his artistic quality. His illustrated article in the last number of ‘Harper’s Magazine’ seems like a farewell message from him in another world. He was also a noted water-colorist, and, in later years, a popular lecturer on natural history. “His facility of expression and ingenious illustration of his subject by his crayon and mechanical appliances instructed and entertained his audiences,
  • 49. and no man had appeared in this field since Agassiz with such success as met him. There was a charm in his personality from the earnestness and kindliness of his nature, and the number of those who mourn his early death is not confined to his personal friends alone. “Pleasant and unfading memories mingle with our regrets at parting with those whose names are recorded here. They were men without exception worthy, true, and of good report. May we not say, as their survivors, and conscious of our failings— “ ‘Our lives are albums written through, With good or ill, with false or true, And as the blessed angels turn The pages of our years, God grant they read the good with smiles And blot the ill with tears.’ “Henry E. Howland, ”Secretary. “Century Club House, “New York, January 9th, 1897.” Other phases of his versatile spirit are noted by Mr. Alexander Black: “I first met Mr. Gibson at the Authors Club in the old rooms on Twenty- fourth Street. At that time he was a regular attendant at the meetings, and he remained among the faithful until his lectures began. Thereafter he came, I fancy, whenever he was free to come, and found a stimulating enjoyment in meeting his fellow-craftsmen, literary and artistic, with whom at all times he had a hearty frankness of cordiality that made him an always-welcome figure in this singularly democratic group. At times I found him pulling at a ‘long Tom,’ generally, as he put it, ‘in self-defense,’ for we hovered in a deep fog of smoke. After I myself had been elected to the Club (in 1888) we met regularly in this literary aerie, and endured in common the recurrent jest inflicted upon those who, at two A.M., still had to make a homeward journey to Brooklyn,—an infliction which fell lightly upon me when I had his company to the Bridge, and could hear him talk of the flowers and their insect visitors, or the current movements of art. “I believe he always retained an affectionate feeling for the Twenty- fourth Street quarters of the Club, where we smoked, ate the Captain’s
  • 50. salad, told stories (Gibson not a poor contributor), seldom talked shop, and certainly never were literary; where we met Lowell, Stedman, Boyesen, Eggleston, Grant White, Godwin, Stoddard, Conway, Jefferson, Riley, Kipling, Mitchell, Hay, St. Gaudens—it would be a long and an interesting list. Mr. Gibson’s genius and personality alike attracted to him the attention of the choicest spirits in a gathering of this kind. He always had a fine fund of that quality which belongs to genius—which is in itself a genius—a quality of youthful enjoyment in the simpler pleasures. I remember the contagious gusto with which, on a certain memorable Watch Night, he told the company a ghost story that came to its crisis in a materialized ghost of his own making which he had concealed under his coat. The hoax recalls some of his fun at Washington village, where his astonishing mummy with a message from the past will long be a droll tradition, and where there is a lively recollection of his dashing horsemanship on a wonderful steed with a feather-duster tail! “I heard him lecture at Washington village and shared in the delight of an audience whose youngest members he held quite as closely as their elders. Indeed, I never have known in any department of science or of art an enthusiast who could convey, with an utter absence of academic formality, so rich and delightful a fund of information and suggestion. To me he was always the ideal interpreter of nature. There was no hint of book covers between. He did not turn to and from his theme at any time. It was part of his life—and plainly a pleasant, unstrenuous part of it. In the woods, in his garden, on the quiet porch overlooking the hillside sumac, he spoke of a discovery in a petal or in the habits of a beetle with that charming undidactic delight of one who assumes that all must have a common pleasure in these phases of natural life. “As an artist he was quite as free from personal mannerisms or eccentricities. When I first visited his studio on Montague street, Brooklyn, he talked as he worked—the picture was an illustration to one of his magazine papers,—and afterwards turned to his portfolio, quite without the effect of entertaining me, but always with a companionly frankness and simplicity that made him at all times the most attractive of hosts. I remember his house studio on Lincoln Place by but two visits, and I had no greater acquaintance with the little crib at the foot of the Washington lawn. I think I liked the dishevelled workshop at Washington best of all.
  • 51. Welcome to our website – the ideal destination for book lovers and knowledge seekers. With a mission to inspire endlessly, we offer a vast collection of books, ranging from classic literary works to specialized publications, self-development books, and children's literature. Each book is a new journey of discovery, expanding knowledge and enriching the soul of the reade Our website is not just a platform for buying books, but a bridge connecting readers to the timeless values of culture and wisdom. With an elegant, user-friendly interface and an intelligent search system, we are committed to providing a quick and convenient shopping experience. Additionally, our special promotions and home delivery services ensure that you save time and fully enjoy the joy of reading. Let us accompany you on the journey of exploring knowledge and personal growth! ebookultra.com