100% found this document useful (1 vote)
83 views

Programming Principles and Practice Using C 1st Edition Bjarne Stroustrup download

The document provides links to various programming and academic ebooks, including titles such as 'Programming Principles and Practice Using C' by Bjarne Stroustrup and 'Object Oriented Programming Using C' by Joyce Farrell. It also includes information about the structure and content of the book, emphasizing programming fundamentals and concepts. Additionally, it mentions the availability of instant digital downloads in multiple formats.

Uploaded by

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

Programming Principles and Practice Using C 1st Edition Bjarne Stroustrup download

The document provides links to various programming and academic ebooks, including titles such as 'Programming Principles and Practice Using C' by Bjarne Stroustrup and 'Object Oriented Programming Using C' by Joyce Farrell. It also includes information about the structure and content of the book, emphasizing programming fundamentals and concepts. Additionally, it mentions the availability of instant digital downloads in multiple formats.

Uploaded by

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

Programming Principles and Practice Using C 1st

Edition Bjarne Stroustrup download

https://ebookname.com/product/programming-principles-and-
practice-using-c-1st-edition-bjarne-stroustrup/

Get Instant Ebook Downloads – Browse at https://ebookname.com


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

Object Oriented Programming Using C Fourth Edition


Joyce Farrell

https://ebookname.com/product/object-oriented-programming-using-
c-fourth-edition-joyce-farrell/

Programming Fundamentals A Modular Structured Approach


Using C Kenneth Leroy Busbee

https://ebookname.com/product/programming-fundamentals-a-modular-
structured-approach-using-c-kenneth-leroy-busbee/

Goddess Traditions in Tantric Hinduism History Practice


and Doctrine 1st Edition Bjarne Wernicke Olesen
(Editor)

https://ebookname.com/product/goddess-traditions-in-tantric-
hinduism-history-practice-and-doctrine-1st-edition-bjarne-
wernicke-olesen-editor/

An Introduction to Political Philosophy 1st Edition


Alexander Rainy Maclean Murray

https://ebookname.com/product/an-introduction-to-political-
philosophy-1st-edition-alexander-rainy-maclean-murray/
Democratic Theorizing from the Margins 1st Edition
Marla Brettschneider

https://ebookname.com/product/democratic-theorizing-from-the-
margins-1st-edition-marla-brettschneider/

Working With Dreams Initiation into the Soul s Speaking


About Itself 1st Edition Wolfgang Giegerich

https://ebookname.com/product/working-with-dreams-initiation-
into-the-soul-s-speaking-about-itself-1st-edition-wolfgang-
giegerich/

Syntax A Functional typological Introduction Volume II


Talmy Givon

https://ebookname.com/product/syntax-a-functional-typological-
introduction-volume-ii-talmy-givon/

Making the British Empire 1660 1800 1st Edition Jason


Peacey

https://ebookname.com/product/making-the-british-
empire-1660-1800-1st-edition-jason-peacey/

The Introduction to the Magee System of Technical


Analysis 2nd Edition W.H.C. Bassetti

https://ebookname.com/product/the-introduction-to-the-magee-
system-of-technical-analysis-2nd-edition-w-h-c-bassetti/
Encyclopedia of law enforcement 1st Edition Larry E.
Sullivan

https://ebookname.com/product/encyclopedia-of-law-
enforcement-1st-edition-larry-e-sullivan/
Programming
Programming
Principles and Practice
Using C++

Bjarne Stroustrup

./.,· Addison-Wesley
Upper Saddle River, NJ • Boston • Indianapolis • San Francisco
New York • Toronto • Montreal • London • Munich • Paris • Madrid
Capetown • Sydney • Tokyo • Singapore • Mexico City
Many of the designations used by manufacturers and sellers to distinguish their products arc claimed as
trademarks. Where those designations appear in this book. and tl1c publisher was aware of a trademark
claim, the designations have been primed witl1 initial capital letters or in all capitals.

A complete list of photo sources and credits appears on pages 1235-1236.

The author and publisher have taken care in the preparation of this book, but make no expressed or im·
plied warran t y of any kind and assume no responsibility for errors or omissioru. No liability is assumed
for incidental or consequential damages in connection witl1 or arising out of the usc of the information or
programs contained herein.

The publisher offers excellent discounts on tllis book when ordered in quantity for bulk purcl!ases or spe­
cial sales, wllich may include electronic versions and/or custom covers and content particular to your busi­
ness. training goals. marketing focus. and branding interests. For more information. please contact:

U.S. Corporate and Govcnuncnt Sales


(800) 382·3419
corpsales@pcarsontcclJgroup.com

For sales outside tl1c United States, please contact:

International Sales
intcmational@pearsoncd.com

Copyright (C' 2009 Pearson Education, Inc.

Stroustrup, Bjame.
Programming principles and practice using C++ I Bjamc Stroustrup.
P· em.
Includes bibliographical references and index.
ISBN 978-0-321-54372·1 (pbk. : alk. paper) I. C++ (Computer program language) I. Title.

QA76.73.C153S82 2008
005.13'3-dc22
2008032595

AU rights reserved. Printed in the United States of America. ll1is publication is protected by copyright, and
permission must be obtained from tl1c publisher prior to any prohibited reproduction, storage in a retrieval
system, or transmission in any form or by any means. electronic, mechanical, photocopying, recording, or
likewise. For information regarding pemlissions, write to:

Pearson Education. Inc.


Rights and Contracts Department
501 Boylston Street, Suite 900
Boston, MA 02116
Fax (617) 671·3447

ISBN-13: 978·0·321·54372·1
ISBN-10: 0-321-54372·6
Text printed in the United States on recycled paper at Courier in Kendallville, Indiana.
Ftrst printing, December 2008
Contents

Preface xxiii
Chapter 0 Notes to the Reader
0.1 The structure of this book 2
0.1. 1 General approach 3
0.1.2 Drills, exercises, etc. 4
0.1.3 What comes after this book? 5
0.2 A philosophy of teaching and learning 6
0.2.1 The order of topics 9
0.2.2 Programming and programming language 10
0.2.3 Portability 11
0.3 Programming and computer science 12
0.4 Creativity and problem solving 12
0.5 Request for feedback 12
0.6 References 13
0.7 Biographies 14
Bjame Stroustrup 14
Lawrence "Pete" Petersen 15

"
vi CONTENTS

Chapter 1 Computers, People, and Programming 17


1. 1 Introduction 18
1.2 Software 19
1.3 People 21
1.4 Computer science 24
1.5 Computers are everywhere 25
1 .5.1 Screens and no screens 26
1.5.2 Shipping 26
1.5.3 Telecommunications 28
1.5.4 Medicine 30
1.5.5 Information 31
1.5.6 A vertical view 32
1 ..5. 7 So what? 34
1.6 Ideals for progranuners 34

Part I The Basics 41

Chapter 2 Hello, World! 43

2. 1 Programs 44
2.2 T he classic first program 45
2.3 Compilation 47
2.4 Linking 51
2.5 Programming environments 52

Chapter 3 Objects, Types, and Values 59


3 . 1 Input 60
3.2 Variables 62
3.3 Input and type 64
3.4 Operations and operators 66
3 .5 Assignment and initialization 69
3.5.1 An example: delete repeated words 71
3.6 Composite assignment operators 73
3.6.1 An example: count repeated words 73
3.7 Names 74
3.8 Types and objects 77
3.9 Type safety 78
3.9.1 Safe conversions 79
3.9.2 Unsafe conversions 80

Chapter 4 Computation 89
4.1 Computation 90
4.2 Objectives and tools 92
CONTENTS vii

4.3 Expressions 94
4.3.1 Constant expressions 95
4.3.2 Operators 96
4.3.3 Conversions 98
4.4 Statements 99
4.4.1 Selection 101
4.4.2 Iteration 108
4.5 Functions 1 12
4.5.1 Why bother with functions? 114
4.5.2 Function declarations 115
4.6 Vector 1 16
4.6.1 Growing a vector 118
4.6.2 A numeric example 119
4 .6.3 A text example 121
4.7 Language features 123

Chapter 5 Errors 1 31
5. 1 Introduction 132
5.2 Sources of errors 134
5.3 Compile-time errors 134
5.3.1 Syntax errors 135
5.3.2 Type errors 136
.5.3.3 Non-errors 137
5.4 Link-time errors 137
5.5 Run-time errors 138
5.5.1 T he caller deals with errors 140
5.5.2 l11e callee deals with errors 141
5.5.3 Error reporting 143
5.6 Exceptions 144
5.6.1 Bad arguments 145
5.6.2 Range errors 146
5.6.3 Bad input 148
5.6.4 Narrowing errors 151
5.7 Logic errors 152
5.8 Estimation 155
5.9 Debugging 156
5.9.1 Practical debug advice 1S7
5. 10 Pre- and post-conditions 161
5.10.1 Post·conditions 163
5. 1 1 Testing 164
viii CONTENTS

Chapter 6 Writing a Program 1 71


6. 1 A problem 172
6.2 Thinking about the problem 173
6.2 .1 Stages of development 174
6.2.2 Strateg y 174
6.3 Back to the calculator! 176
6.3.1 Frrst attempt 177
6.3.2 Tokens 179
6.3.3 Implementing tokens 181
6.3.4 Using tokens 183
6.3.5 Back to the drawing board 185
6.4 Grammars 186
6.4.1 A detour: English grammar 191
6.4.2 Writing a grammar 192
6.5 Turning a grammar into code 193
6.5.1 Implementing grammar rules 194
6.5.2 Expressions 195
6.5.3 Terms 198
6.5.4 Primary expressions 200
6.6 Trying the first version 20 1
6.7 Trying the second version 206
6.8 Token streams 207
6.8.1 Implementing Token_stream 209
6.8.2 Reading tokens 211
6.8.3 Reading numbers 212
6.9 Program structure 2 13

Chapter 7 Completing a Program 21 9


7. 1 Introduction 220
7.2 Input and output 220
7.3 Error handling 222
7.4 Negative numbers 227
7.5 Remainder: % 228
7.6 Cleaning up the code 23 1
7.6.1 Symbolic constants 231
7.6.2 Use of functions 233
7.6.3 Code layout 234
7.6.4 Commenting 236
7.7 Recovering from errors 238
7.8 Variables 241
7.8.1 Variables and defmitions 241
7.8.2 Introducing names 246
7.8.3 Predefined names 249
7.8.4 Are we there yet? 249
C O N T E N TS ix

Chapter 8 Technicalities: Functions, etc. 253


8.1 Technicalities 254
8.2 Declarations and definitions 255
8.2.1 Kinds of declarations 259
8.2.2 Variable and constant declarations 260
8.2.3 Default initiali7.ation 261
8.3 Header files 261
8.4 Scope 264
8.5 Function call and return 269
8.5.1 Declaring arguments and return type 27 0
8.5.2 Returning a value 271
8.5.3 Pass·by-value 27 3
8.5.4 Pass-by-const-reference 27 3
8.5.5 Pass-by-reference 276
8.5.6 Pass-by-value vs. pass-by-reference 279
8.5.7 Argument checking and conversion 281
8.5.8 Function call implementation 282
8.6 Order of evaluation 287
8.6.1 Expression evaluation 288
8.6.2 Global initialization 288
8.7 Namespaccs 290
8.7.1 using declarations and using directives 291

Chapter 9 Technicalities: Classes, etc. 299


9.1 User·defmed types 300
9.2 Classes and members 301
9.3 Interface and implementation 302
9.4 Evolving a class 304
9.4.1 strud and functions 304
9.4.2 Member functions and constructors 306
9.4.3 Keep details private 308
9.4.4 Defming member functions 309
9.4.5 Referring to the current object 312
9.4.6 Reporting errors 313
9.5 Enumerations 314
9.6 Operator overloading 316
9.7 Class interfaces 318
9.7.1 Argument types 319
9.7.2 Copying 321
9.7.3 Default constructors 322
9.7.4 const member functions 325
9.7.5 Members and "helper functions" 326
9.8 T he Date class 328
X CONTE NTS

Part I I Input and Output 337

Chapter 10 Input and Output Streams 339


10.1 Input and output 340
10.2 T he 110 stream model 341
10.3 Ftles 343
10.4 Opening a ftle 344
10.5 Reading and writing a ftle 346
10.6 110 error handling 348
10.7 Reading a single value 352
10.7.1 Breaking the problem into manageable parts 353
10.7.2 Separating dialog from function 356
10.8 User-defined output operators 357
10.9 User-defined input operators 359
10.10 A standard input loop 359
10.11 Reading a structured ftle 361
10.11.1 In-memory representation 362
10.11.2 Reading structured values 364
10.11.3 Changing representations 368

Chapter 11 Customizing Input and Output 375


11.1 Regularity and irregularity 376
11.2 Output formatting 376
11.2.1 Integer output 37 7
11.2.2 Integer input 379
11.2.3 Floating-point output 380
11.2.4 Precision 382
11.2.5 Fields 383
11.3 Ftle opening and positioning 384
11.3.1 File open modes 385
11.3.2 Binary files 386
11.3.3 Positioning in files 389
11.4 String streams 390
11.5 Line-oriented input 391
11.6 Character classification 392
11.7 Using nonstandard separators 394
11.8 And there is so much more 401
Chapter 12 A Display Model 407
12.1 Why graphics? 408
12.2 A display model 409
12.3 A first example 410
C O N T E N TS xi

12.4 Using a GUI library 414


12.5 Coordinates 415
12.6 Shapes 416
12.7 Using Shape primitives 417
12.7.1 Graphics headers and main 417
12.7.2 An almost blank window 418
12.7.3 Axis 420
12.7.4 Graphing a function 422
12.7.5 Polygons 423
12.7.6 Rectangles 424
12. 7.7 Fill 427
12.7.8 Text 427
12.7.9 Images 429
12.7.10 And much more 430
12.8 Getting this to run 431
12.8.1 Source files 432
Chapter 13 Graphics Classes 437
13.1 Overview of graphics classes 438
13.2 Point and Line 440
13.3 Lines 443
13.4 Color 445
13.5 Line_style 448
13.6 Open_polyline 450
13.7 Closed_polyline 451
13.8 Polygon 453
13.9 Rectangle 455
13.10 Managing unnamed objects 459
13.11 Text 462
13.12 Circle 464
13.13 Ellipse 466
13.14 Marked_polyline 468
13.15 Marks 469
13.16 Mark 470
13.17 Images 472
Chapter 14 Graphics Class Design 479
14.1 Design principles 480
14.1.1 Types 480
14.1.2 Operations 482
14.1.3 Naming 483
14.1.4 Mutability 484
xii CONTENTS

14.2 Shape 485


14.2.1 An abstract class 487
14.2.2 Access control 488
14.2.3 Drawing shapes 491
14.2.4 Copying and mutability 494
14.3 Base and derived classes 496
14.3.1 Object layout 497
14.3.2 Deriving classes and defining virtual functions 499
14.3.3 Overriding 500
14.3.4 Access 501
14.3.5 Pure virtual functions 502
14.4 Benefits of object-oriented progranuning 504
Chapter 1 5 Graphing Functions and Data 509
15.1 Introduction 510
15.2 Graphing simple functions 510
15.3 Function 514
15.3.1 Default arguments 515
15.3.2 More exam ples 517
15.4 Axis 518
15.5 Approximation 521
15.6 Graphing data 526
15.6.1 Reading a file 528
15.6.2 General layout 530
15.6.3 Scaling data 531
15.6.4 Building the graph 532

Chapter 1 6 Graphical User lnteriaces 539


16.1 User interface alternatives 540
16.2 The "Next" button 541
16.3 A simple window 542
16.3.1 A callback function 544
16.3.2 A wait loop 547
16.4 Button and other Widgets 548
16.4.1 Widgets 548
16.4.2 Buttons 549
16.4.3 ln_box and Out_box 550
16.4.4 Menus 551
16.5 An example 552
16.6 Control inversion 556
16.7 Adding a menu 557
16.8 Debugging GUI code 562
CONTENTS xiii

Part Ill Data and Algorithms 567

Chapter I 7 Vector and Free Store 569


17.1 Introduction 570
17.2 vector basics 572
17.3 Memory, addresses , and pointers 574
17.3.1 The sizeof operator 576
17.4 Free store and pointers 577
17.4.1 Free·store allocation 578
17.4.2 Access through pointers 579
17.4.3 Ranges 580
17.4.4 Initialization 582
17.4.5 The null pointer 583
17.4.6 Free-store deallocation 584
17.5 Destructors 586
17.5.1 Generated destructors 588
17.5.2 Destructors and free store 589
17.6 Access to elements 590
17.7 Pointers to class objects 591
17.8 Messing with types: void* and casts 593
17.9 Pointers and references 595
17.9.1 Pointer and reference parameters 596
17.9.2 Pointers, references, and inheritance 598
17.9.3 An example: lists 598
17.9.4 List operations 600
17.9.5 List use 602
17.10 The this pointer 603
17.10.1 More link use 606
Chapter 18 Vectors and Arrays 611
18.1 Introduction 612
18.2 Copying 613
18.2.1 Copy constructors 614
18.2.2 Copy assignments 616
18.2.3 Copy terminology 618
18.3 Essential operations 620
18.3.1 Explicit constructors 621
18.3.2 Debugging constructors and destructors 622
18.4 Access to vector elements 625
18.4.1 Overloading on const 626
xiv CONTENTS

18.5 Arrays 627


18.5.1 Pointers to array elements 628
18.5.2 Pointers and arrays 631
18.5.3 Array initialization 633
18.5.4 Pointer problems 634
18.6 Examples: palindrome 637
18.6.1 Palindromes using string 637
18.6.2 Palindromes using arrays 638
18.6.3 Palindromes using pointers 640

Chapter 1 9 Vector, Templates, and Exceptions 645


19.1 The problems 646
19.2 Changing size 649
19.2.1 Representation 649
19.2.2 reserve and capacity 651
19.2.3 resize 652
19.2.4 push_back 652
19.2.5 Assignment 653
19.2.6 Our vector so far 655
19.3 Templates 656
19.3.1 Types as template parameters 656
19.3.2 Generic programming 659
19.3.3 Containers and inheritance 661
19.3.4 Integers as template parameters 662
19.3.5 Template argument deduction 664
19.3.6 Generalizing vector 665
19.4 Range checking and exceptions 668
19.4.1 An aside: design considerations 670
19.4.2 A confession: macros 671
19.5 Resources and exceptions 672
19.5.1 Potential resource management problems 673
19.5.2 Resource acquisition is initialization 675
19.5.3 Guarantees 676
19.5.4 auto_ptr 678
19.5.5 RAil for vector 678

Chapter 20 Containers and lterators 685


20.1 Storing and processing data 686
20.1.1 Working with data 687
20.1.2 Generalizing code 688
20.2 SIL ideals 690
CONTENTS

20.3 Sequences and iterators 694


20.3.1 Back to the example 696
20.4 Linked lists 698
20.4.1 List operations
699
20.4.2 Iteration
701
20.5 Generalizing vector yet again 703
20.6 An example: a simple text editor 704
20.6.1 Lines 707
20.6.2 Iteration 708
20.7 vector, list, and string 711
20.7.1 insert and erase 713
20.8 Adapting our vector to the STL 715
20.9 Adapting built-in arrays to the STL 718
20.10 Container overview 719
20.10.1 lterator categories 722
Chapter 21 Algorithms and Maps 727
21.1 Standard library algorithms 728
21.2 The simplest algorithm: find() 729
21.2.1 Some generic uses 731
21.3 The general search: find_if() 732
21.4 Function objects 734
21.4.1 An abstract view of function objects 736
21.4.2 Predicates on class members 737
21.5 Numerical algorithms 738
21.5.1 Accumulate 739
21.5.2 Generalizing accumulate() 740
21.5.3 Inner product 742
21.5.4 Generalizing inner_produd() 743
21.6 Associative containers 7 44
21.6.1 Maps 745
21.6.2 map overview 747
21.6.3 Another map example 750
21.6.4 unordered_map 753
21.6.5 Sets 755
21.7 Copying 757
21.7.1 Copy 757
21. 7.2 Stream iterators 758
21.7.3 Using a set to keep order 761
21.7.4 copy_if 761
21.8 Sorting and searching 762
xvi CONTENTS

Part IV Broadening the View 769

Chapter 22 Ideals and History 771


22.1 History, ideals, and professionalism 772
22.1.1 Progranuning language aims and philosophies 772
22.1.2 Progranuning ideals 774
22.1.3 St-yles/paradigms 781
22.2 Programming language history overview 783
22.2.1 T he earliest languages 784
22.2.2 T he roots of modem languages 786
22.2.3 T he Algol family 791
22.2.4 Simula 798
22.2.5 c 800
22.2.6 C++ 804
22.2.7 Today 807
22.2.8 Information sources 808

Chapter 23 Text Manipulation 81 3


23.1 Text 814
23.2 Strings 814
23.3 1/0 streams 819
23.4 Maps 820
23.4.1 Implementation details 826
23.5 A problem 828
23.6 T he idea of regular expressions 830
23.7 Searching with regular expressions 833
23.8 Regular expression syntax 836
23.8.1 Characters and special characters 836
23.8.2 Character classes 837
23.8.3 Repeats 838
23.8.4 Grouping 840
23.8.5 Alternation 840
23.8.6 Character sets and ranges 841
23.8.7 Regular expression errors 842
23.9 Matching with regular expressions 844
23.10 References 849
Chapter 24 Numerics 853
24.1 Introduction 854
24.2 Size, precision, and overflow 854
24.2.1 Numeric limits 858
24.3 Arrays 859
24.4 C-style multidimensional arrays 859
CONTENTS xvii

24.5 The Matrix library 861


24.5.1 Dimensions and access 862
24.5.2 1D Matrix 865
24.5.3 2D Matrix 868
24.5.4 Matrix 110 870
24.5.5 3D Matrix 871
24.6 An example: solving linear equations 872
24.6.1 Classical Gaussian elimination 874
24.6.2 P ivoting 875
24.6.3 Testing 876
24.7 Random numbers 877
24.8 The standard mathematical functions 879
24.9 Complex numbers 880
24.10 References 882
Chapter 25 Embedded Systems Programming 887
25.1 Embedded systems 888
25.2 Basic concepts 891
25.2.1 Predictability 894
25.2.2 Ideals 894
25.2.3 Living with failure 895
25.3 Memory management 897
25.3.1 Free-store problems 898
25.3.2 Alternatives to general free store 901
25.3.3 Pool example 902
25.3.4 Stack example 903
25.4 Addresses, pointers, and arrays 905
25.4.1 Unchecked conversions 905
25.4.2 A problem: dysfunctional interfaces 905
25.4.3 A solution: an interface class 909
25.4.4 Inheritance and containers 912
25.5 Bits, bytes, and words 916
25.5.1 Bits and bit operations 916
25.5.2 bitset 920
25.5.3 Signed and unsigned 922
25.5.4 Bit manipulation 926
25.5.5 Bitfields 928
25.5.6 An example: simple encryption 930
25.6 Coding standards 935
25.6.1 What should a coding standard be? 936
25.6.2 Sample rules 937
25.6.3 Real coding standards 943
xviii CONTENTS

Chapter 26 Testing 949


26.1 What we want 950
26.1.1 Caveat 951
26.2 Proofs 952
26.3 Testing 952
26.3.1 Regression tests 953
26.3.2 Unit tests 954
26.3.3 Algorithms and non-algorithms 961
26.3.4 System tests 969
26.3.5 Testing classes 973
26.3.6 Fmding assumptions that do not hold 976
26.4 Design for testing 978
26.5 Debugging 979
26.6 Performance 979
26.6.1 Trming 981
26.7 References 983
Chapter 27 The C Programming Language 987
27.1 C and C++: siblings 988
27.1.1 C/C++ compatibility 990
27.1.2 C++ features missing from C 991
27.1.3 T he C standard library 993
27.2 Functions 994
27.2.1 No function name overloading 994
27.2.2 Function argument type checking 995
27.2.3 Function defmitions 997
27.2.4 Calling C from C++ and C++ from C 998
27.2.5 Pointers to functions 1000
27.3 Minor language differences 1002
27.3.1 struct tag namespace 1002
27.3.2 Keywords 1003
27.3.3 Defmitions 1004
27.3.4 C-style casts 1006
27.3.5 Conversion of void" 1007
27.3.6 enum 1008
27.3.7 Namespaces 1008
27.4 Free store 1009
27.5 C-style strings 1011
27.5.1 C-style strings and const 1013
27.5.2 Byte operations 1014
27.5.3 An example: strcpyO 1015
27.5.4 A style issue 1015
CONTENTS xix

27.6 Input/output: stdio 1016


27.6.1 Output 1016
27.6.2 Input 1017
27.6.3 Files 1019
27.7 Constants and macros 1020
27.8 Macros 1021
27.8.1 Function-like macros 1022
27.8.2 Syntax macros 1023
27.8.3 Conditional compilation 1024
27.9 An example: intrusive containers 1025

Part V Appendices 1 035

Appendix A Language Summary 1 03 7


A.1 General 1038
A.l.l Terminology 1039
A.l.2 Program start and termination 1039
A.l.3 Comments 1040
A.2 Literals 1041
A.2.1 lnteger literals 1041
A.2.2 Floating-point-literals 1042
A.2.3 Boolean literals 1043
A.2.4 Character literals 1043
A.2.5 String literals 1044
A.2.6 T he pointer literal 1044
A.3 Identifiers 1045
A.3.1 Keywords 1045
A.4 Scope, storage class, and lifetime 1046
A.4.1 Scope 1046
A.4.2 Storage class 1047
A.4.3 Lifetime 1048
A.5 Expressions 1049
A.5.1 User-defined operators 1054
A.5.2 Implicit type conversion 1054
A.5.3 Constant expressions 1056
A.5.4 sizeof 1057
A.5.5 Logical expressions 1057
A.5.6 new and delete 1057
A.5.7 Casts 1058
A.6 Statements 1059
A.7 Declarations 1061
A.7.1 Defmitions 1061
xx CONTENTS

A.8 Built-in types 1062


A.8.1 Pointers 1063
A.8.2 Arrays 1064
A.8.3 References 1065
A.9 Functions 1066
A.9.1 Overload resolution 1067
A.9.2 Default arguments 1068
A.9.3 Unspecified arguments 1068
A.9.4 Linkage specifications 1069
A.10 User-defined types 1069
A.10.1 Operator overloading 1069
A.ll Enumerations 1070
A.12 Classes 1071
A.12.1 Member access 1071
A.12.2 Class member defmitions 1074
A.12.3 Construction, destruction, and copy 1075
A.12.4 Derived classes 1078
A.12.5 Bitfields 1082
A.12.6 Unions 1082
A.13 Templates 1083
A.13.1 Template arguments 1084
A.13.2 Template instantiation 1084
A.13.3 Template member types 1086
A.14 Exceptions 1086
A.15 Namespaces 1088
A.16 Aliases 1089
A.17 Preprocessor directives 1 090
A.17.1 #i nclude 1090
A.17.2 #defi ne 1090

Appendix B Standard Library Summary 1 09.3


B.1 Overview 1094
B.l.l Header files 1095
B.l.2 Namespace std 1098
B.l.3 Description st-yle 1098
B.2 Error handling 1098
B.2.1 Exceptions 1099
B .3 lterators 11 00
B.3.1 lterator model 1101
B.3.2 lterator categories 1103
CONTENTS xxi

B.4 Containers 1105


B.4.1 Overview 1107
B.4.2 Member types 1108
B.4.3 Constructors, destructors, and assignments 1108
B.4.4 lterators 1109
B.4.5 Element access 1109
B.4.6 Stack and queue operations 1110
B.4.7 List operations 1110
B.4.8 Size and capacity 1110
B.4.9 Other operations 1111
B.4.10 Associative container operations 1111
B.5 Algorithms 1112
B.5.1 NorunodifYing sequence algorithms 1113
B.5.2 ModifYing sequence algorithms 1114
B.5.3 Utility algorithms 1116
B.5.4 Sorting and searching 1117
B.S.S Set algorithms 1118
B.5.6 Heaps 1119
B.5.7 Permutations 1120
B.5.8 min and max 1120
B.6 STL utilities 1121
B.6.1 Inserters 1121
B.6.2 Function objects 1122
B.6.3 pair 1123
B.7 110 streams 1124
B.7.1 1/0 streams hierarchy 1126
B.7.2 Error handling 1127
B.7.3 Input operations 1128
B.7.4 Output operations 1128
B.7.5 Formatting 1129
B.7.6 Standard manipulators 1129
B.B String manipulation 1131
B.8.1 Character classification 1131
B.8.2 String 1132
B.8.3 Regular expression matching 1133
B.9 Numerics 1135
B.9.1 Numerical limits 1135
B.9.2 Standard mathematical functions 1137
B.9.3 Complex 1138
B.9.4 valarray 1139
B.9.5 Generalized numerical algorithms 1139
xxii CONTENTS

B.10 C standard library functions 1140


B.10.1 Files 1140
B.10.2 The printf() family 1141
B.10.3 C-style strings 1145
B.10.4 Memory 1146
B.10.5 Date and time 1147
B.10.6 Etc. 1149
B.11 Other libraries 1150
Appendix C Getting Started with Visual Studio 1 1 51
C.1 Getting a program to run 1152
C.2 Installing Visual Studio 1152
C.3 Creating and running a program 1153
C.3.1 Create a new project 1153
C.3.2 Use the std_lib_fa cilities.h header file 1153
C.3.3 Add a C++ source file to the project 1154
C.3.4 Enter your source code 1154
C.3.5 Build an executable program 1154
C.3.6 Execute the program 1155
C.3.7 Save the program 1155
C.4 Later 1155
Appendix D Installing FLTK 1 1 57
0.1 Introduction 1158
0.2 Downloading FLTK 1158
0.3 Installing FLTK 1159
0.4 Using FLTK in Visual Studio 1159
0.5 Testing if it all worked 1160

Appendix E GUI Implementation 1 1 61


E.1 Callback implementation 1162
E.2 Widget implementation 1163
E.3 Window implementation 1164
E.4 Vector_ref 1166
E.5 An example: manipulating Widgets 1167

Glossary 1171
Bibliography 1177
Index 1181
Preface

"Damn the torpedoes!


Full speed ahead."

-Admiral Farragut

Programming is the art of expressing solutions to problems so that a computer


can execute those solutions. Much of the effort in programming is spent fmding
and refining solutions. Often, a problem is only fully understood through the
process of programming a solution for it.
T his book is for someone who has never programmed before but is willing
to work hard to learn. It helps you understand the principles and acquire the
practical skills of programming using the C++ programming language. My aim
is for you to gain sufficient knowledge and experience to perform simple useful
programming tasks using the best up-to-date techniques. How long will that
take? As part of a first-year university course, you can work through this book in
a semester (assuming that you have a workload of four courses of average diffi­
culty). If you work by yourself, don't expect to spend less time than that (maybe
15 hours a week for 14 weeks).
Three months may seem a long time, but there's a lot to learn and you'll be
writing your first simple programs after about an hour. Also, all learning is grad­
ual: each chapter introduces new useful concepts and illustrates them with exam­
ples inspired by real-world uses. Your ability to express ideas in code - getting a
computer to do what you want it to do - gradually and steadily increases as you
go along. I never say, ..Learn a month's worth of theory and then see if you can
use it."

xxiii
xxiv PREFACE

Why would you want to program? Our civilization runs on software. With·
out understanding software you are reduced to believing in "magic" and will be
locked out of many of the most interesting, profitable, and socially useful techni­
cal fields of work. When I talk about programming, I think of the whole spec­
trum of computer programs from personal computer applications with G Uls
(graphical user interfaces), through engineering calculations and embedded sys­
tems control applications (such as digital cameras, cars, and cell phones), to text
manipulation applications as found in many humanities and business applica­
tions. Like mathematics, programming- when done well- is a valuable intellec­
tual exercise that sharpens our ability to think. However, thanks to feedback
from the computer, programming is more concrete than most forms of math, and
therefore accessible to more people. It is a way to reach out and change the world
- ideally for the better. Finally, programming can be great fun.
W hy C++? You can't learn to program without a progranmung language,
and C++ directly supports the key concepts and techniques used in real-world
software. C++ is one of the most widely used programming languages, found in
an unsurpassed range of application areas. You fmd C++ applications every·
where from the bottom of the oceans to the surface of Mars. C++ is precisely
and comprehensively defmed by a nonproprietary international standard. Qyal·
ity and/or free implementations are available on every kind of computer. Most of
the programming concepts that you will learn using C++ can be used directly in
other languages, such as C, C#, Fortran, andjava. Fmally, I simply like C++ as
a language for writing elegant and efficient code.
This is not the easiest book on beginning programming; it is not meant to
be. I just aim for it to be the easiest book from which you can learn the basics of
real-world programming. That's quite an ambitious goal because much modern
software relies on techniques considered advanced just a few years ago.
My fundamental assumption is that you want to write programs for the use
of others, and to do so responsibly, providing a decent level of system quality:
that is, I assume that you want to achieve a level of professionalism. Consc·
quently, I chose the topics for this book to cover what is needed to get started
with real-world programming. not just what is easy to teach and learn. If you
need a technique to get basic work done right, I describe it. demonstrate concepts
and language facilities needed to support the technique, provide exercises for it,
and expect you to work on those exercises. If you just want to understand toy
programs, you can get along with far less than I present. On the other hand, I
won't waste your time with material of marginal practical importance. If an idea
is explained here, it's because you'll almost certainly need it.
If your desire is to use the work of others without understanding how things
arc done and witl10ut adding significantly to the code yourself, tills book is not
for you. If so, please consider whether you would be better served by another
book and another language. If that is approximately your view of programming,
please also consider from where you got that view and whether it in fact is adc·
quate for your needs. People often underestimate the complexity of program-
Discovering Diverse Content Through
Random Scribd Documents
The Project Gutenberg eBook of The Terms of
Surrender
This ebook is for the use of anyone anywhere in the United States
and most other parts of the world at no cost and with almost no
restrictions whatsoever. You may copy it, give it away or re-use it
under the terms of the Project Gutenberg License included with this
ebook or online at www.gutenberg.org. If you are not located in the
United States, you will have to check the laws of the country where
you are located before using this eBook.

Title: The Terms of Surrender

Author: Louis Tracy

Release date: January 17, 2013 [eBook #41859]


Most recently updated: October 23, 2024

Language: English

Credits: Produced by D Alexander and the Online Distributed


Proofreading Team at http://www.pgdp.net (This file was
produced from images generously made available by The
Internet Archive)

*** START OF THE PROJECT GUTENBERG EBOOK THE TERMS OF


SURRENDER ***
THE TERMS OF SURRENDER

By LOUIS TRACY
THE WINGS OF THE MORNING
THE PILLAR OF LIGHT
THE GREAT MOGUL
THE CAPTAIN OF THE KANSAS
KARL GRIER
THE WHEEL O’ FORTUNE
THE KING OF DIAMONDS
THE RED YEAR
THE MESSAGE
A SON OF THE IMMORTALS
THE STOWAWAY
CYNTHIA’S CHAUFFEUR
THE SILENT BARRIER
MIRABEL’S ISLAND
ONE WONDERFUL NIGHT
THE “MIND THE PAINT” GIRL
THE TERMS OF SURRENDER
The Terms of
Surrender
BY

LOUIS TRACY

Author of
“The Wings of the Morning,” “One Wonderful
Night,” etc., etc.

New York
Edward J. Clode
Publisher

Copyright 1913 by Edward J. Clode.


CONTENTS

I At “MacGonigal’s” 1
II The Terms of Surrender 18
III Showing How Power Acquired a Limp 34
IV The Sudden Rise of Peter MacGonigal 51
V Wherein Power Travels East 68
VI The Meeting 85
VII The Forty Steps 104
VIII The Step That Counted 124
IX The Chase 144
X Nancy Decides 164
XI Power’s Home-Coming 185
XII After Darkness, Light 205
XIII The Beginning of the Pilgrimage 226
XIV The Wander-Years 249
XV The New Life 270
XVI Power Driven into Wilderness 293
XVII Showing How Power Met a Guide 313
XVIII The Second Generation 331
XIX The Settlement 352
XX The Passing of the Storm 376

THE TERMS OF SURRENDER


CHAPTER I

AT “MacGONIGAL’S”
“Hullo, Mac!”
“Hullo, Derry!”
“What’s got the boys today? Is there a round-up somewhere?”
“Looks that-a way,” said Mac, grabbing a soiled cloth with an air of
decision, and giving the pine counter a vigorous rub. At best, he was
a man of few words, and the few were generally to the point; yet his
questioner did not seem to notice the noncommittal nature of the
reply, and, after an amused glance at the industrious Mac, quitted
the store as swiftly as he had entered it. But he flung an explanatory
word over his shoulder:
“Guess I’ll see to that plug myself—he’s fallen lame.”
Then John Darien Power swung out again into the vivid sunshine
of Colorado (“vivid” is the correct adjective for sunshine thereabouts
in June about the hour of the siesta) and gently encouraged a
dispirited mustang to hobble on three legs into the iron-roofed lean-
to which served as a stable at “MacGonigal’s.” Meanwhile, the
proprietor of the store gazed after Power’s retreating figure until
neither man nor horse was visible. Even then, in an absent-minded
way, he continued to survey as much of the dusty surface of the
Silver State as was revealed through the rectangle of the doorway, a
vista slightly diminished by the roof of a veranda. What he saw in
the foreground was a whitish brown plain, apparently a desert, but
in reality a plateau, or “park,” as the local name has it, a tableland
usually carpeted not only with grama and buffalo grasses curing on
the stem, but also with flowers in prodigal abundance and of
bewildering varieties. True, in the picture framed by the open door
neither grass-stems nor flowers were visible, unless to the
imaginative eye. There was far too much coming and going of men
and animals across the strip of common which served the purposes
of a main street in Bison to permit the presence of active vegetation
save during the miraculous fortnight after the spring rains, when, by
local repute, green whiskers will grow on a bronze dog. Scattered
about the immediate vicinity were the ramshackle houses of men
employed in the neighboring gold and silver reduction works. The
makeshift for a roadway which pierced this irregular settlement led
straight to MacGonigal’s, and ended there. As every man, woman,
and child in the place came to the store at some time of the day or
night, and invariably applied Euclid’s definition of the nearest way
between two given points, the flora of Colorado was quickly stamped
out of recognition in that particular locality, except during the
irrepressible period when, as already mentioned, the fierce rains of
April pounded the sleeping earth and even bronze dogs into a
frenzied activity. Further, during that year, now nearly quarter of a
century old, there had been no rain in April or May, and precious
little in March. As the ranchers put it, in the figurative language of
their calling, “the hull blame state was burnt to a cinder.”
The middle distance was lost altogether; for the park sloped, after
the manner of plateaus, to a deep valley through which trickled a
railroad and the remains of a river. Some twenty miles away a belt of
woodland showed where Denver was justifying its name by growing
into a city, and forty miles beyond Denver rose the blue ring of the
Rocky Mountains. These details, be it understood, are given with the
meticulous accuracy insisted on by map-makers. In a country where,
every year, the percentage of “perfectly clear” days rises well above
the total of all other sorts of days, and where a popular and never-
failing joke played on the newcomer is to persuade him into taking
an afternoon stroll from Denver to Mount Evans, a ramble of over
sixty miles as the crow flies, the mind refuses to be governed by
theodolites and measuring rods. Indeed, the deceptive clarity of the
air leads to exaggeration at the other end of the scale, because no
true son or daughter of Colorado will walk a hundred yards if there is
a horse or car available for the journey. Obviously, walking is a vain
thing when the horizon and the next block look equidistant.
It may, however, be taken for granted that none of these
considerations accounted for MacGonigal’s fixed stare at the sunlit
expanse. In fact, it is probable that his bulging eyes took in no
special feature of the landscape; for they held an introspective look,
and he stopped polishing the counter as abruptly as he had begun
that much-needed operation when Power entered the store. He
indulged in soliloquy, too, as the habit is of some men in perplexity.
Shifting the cigar he was smoking from the left corner of his wide
mouth to the right one by a dexterous twisting of lips, with tongue
and teeth assisting, he said aloud:
“Well, ef I ain’t dog-goned!”
So, whatever it was, the matter was serious. It was a convention
at Bison that all conversation should be suspended among the
frequenters of MacGonigal’s when the storekeeper remarked that he
was dog-goned. Ears already alert were tuned at once to intensity.
When Mac was dog-goned, events of vital importance to the
community had either happened or were about to happen. Why,
those words, uttered by him, common as they were in the mouths of
others, had been known to stop One-thumb Jake from opening a
jack-pot on a pat straight! Of course, the pot was opened all right
after the social avanlanche heralded by the storekeeper’s epoch-
making ejaculation had rolled past, or Jake’s remaining thumb might
have been shot off during the subsequent row.
Apparently, MacGonigal was thinking hard, listening, too; for he
seemed to be following Power’s movements, and nodded his head in
recognition of the rattle of a chain as the horse was tied to a feeding
trough, the clatter of a zinc bucket when Power drew water from a
tank, and the stamping of hoofs while Power was persuading the
lame mustang to let him bathe and bandage the injured tendons.
Then the animal was given a drink—he would be fed later—and the
ring of spurred boots on the sun-baked ground announced that
Derry was returning to the store.
Power’s nickname, in a land where a man’s baptismal certificate is
generally ignored, was easily accounted for by his second name,
Darien, conferred by a proud mother in memory of a journey across
the Isthmus when, as a girl, she was taken from New York to San
Francisco by the oldtime sea route. The other day, when he stood
for a minute or so in the foyer of the Savoy Hotel in London, waiting
while his automobile was summoned from the courtyard, he seemed
to have lost little of the erect, sinewy figure and lithe carriage which
were his most striking physical characteristics twenty-five years ago;
but the smooth, dark-brown hair had become gray, and was slightly
frizzled about the temples, and the clean-cut oval of his face bore
records of other tempests than those noted by the Weather Bureau.
In walking, too, he moved with a decided limp. At fifty, John Darien
Power looked the last man breathing whom a storekeeper in a
disheveled mining village would hail as “Derry”; yet it may be safely
assumed that his somewhat hard and care-lined lips would have
softened into a pleasant smile had someone greeted him in the
familiar Colorado way. And, when that happened, the friend of
bygone years would be sure that no mistake had been made as to
his identity; for, in those early days, Power always won approval
when he smiled. His habitual expression was one of concentrated
purpose, and his features were cast in a mold that suggested repose
and strength. Indeed, their classic regularity of outline almost
bespoke a harsh nature were it not for the lurking humor in his large
brown eyes, which were shaded by lashes so long, and black, and
curved that most women who met him envied him their possession.
Children and dogs adopted him as a friend promptly and without
reservation; but strangers of adult age were apt to regard him as a
rather morose and aloof-mannered person, distinctly frigid and self-
possessed, until some chance turn in the talk brought laughter to
eyes and lips. Then a carefully veiled kindliness of heart seemed to
bubble to the surface and irradiate his face. All the severity of firm
mouth and determined chin disappeared as though by magic; and
one understood the force of the simile used by a western
schoolma’am, who contributed verse to the Rocky Mountain News,
when she said that Derry’s smile reminded her of a sudden burst of
sunshine which had converted into a sparkling mirror the somber
gloom of a lake sunk in the depths of some secluded valley. Even in
Colorado, people of the poetic temperament write in that strain.
Now, perhaps, you have some notion of the sort of young man it
was who came back to the dog-goned MacGonigal on that June day
in the half-forgotten ’80’s. Add to the foregoing description certain
intimate labels—that he was a mining engineer, that he had been
educated in the best schools of the Far West, that he was slender,
and well knit, and slightly above the middle height, and that he
moved with the gait of a horseman and an athlete—and the portrait
is fairly complete.
The storekeeper was Power’s physical antithesis. He was short and
fat, and never either walked or rode; but his North of Ireland
ancestors had bequeathed him a shrewd brain and a Scottish
slowness of speech that gave him time to review his thoughts before
they were uttered. No sooner did he hear his visitor’s approaching
footsteps than he began again to polish the pine boards which
barricaded him from the small world of Bison.
Such misplaced industry won a smile from the younger man.
“Gee whizz, Mac, it makes me hot to see you work!” he cried.
“Anyhow, if you’ve been whirling that duster ever since I blew in you
must be tired, so you can quit now, and fix me a bimetallic.”
With a curious alacrity, the stout MacGonigal threw the duster
aside, and reached for a bottle of whisky, an egg, a siphon of soda,
and some powdered sugar. Colorado is full of local color, even to the
naming of its drinks. In a bimetallic the whole egg is used, and
variants of the concoction are a gold fizz and a silver fizz, wherein
the yoke and the white figure respectively.
“Whar you been, Derry?” inquired the storekeeper, whose massive
energy was now concentrated on the proper whisking of the egg.
“Haven’t you heard? Marten sent me to erect the pump on a
placer mine he bought near Sacramento. It’s a mighty good
proposition, too, and I’ve done pretty well to get through in four
months.”
“Guess I was told about the mine; but I plumb forgot. Marten was
here a bit sence, an’ he said nothin’.” Power laughed cheerfully. “He’ll
be surprised to see me, and that’s a fact. He counted on the job
using up the best part of the summer, right into the fall; but I made
those Chicago mechanics open up the throttle, and here I am,
having left everything in full swing.”
“Didn’t you write?”
“Yes, to Denver. I don’t mind telling you, Mac, that I would have
been better pleased if the boss was there now. I came slick through,
meaning to make Denver tomorrow. Where is he—at the mill?”
“He was thar this mornin’.”
Power was frankly puzzled by MacGonigal’s excess of reticence. He
knew the man so well that he wondered what sinister revelation lay
behind this twice-repeated refusal to give a direct reply to his
questions. By this time the appetizing drink was ready, and he
swallowed it with the gusto of one who had found the sun hot and
the trail dusty, though he had ridden only three miles from the
railroad station in the valley, where he was supplied with a lame
horse by the blunder of a negro attendant at the hotel.
It was his way to solve a difficulty by taking the shortest possible
cut; but, being quite in the dark as to the cause of his friend’s
perceptible shirking of some unknown trouble, he decided to adopt
what logicians term a process of exhaustion.
“All well at Dolores?” he asked, looking straight into the
storekeeper’s prominent eyes.
“Bully!” came the unblinking answer.
Ah! The worry, whatsoever it might be, evidently did not concern
John Darien Power in any overwhelming degree.
“Then what have you got on your chest, Mac?” he said, while
voice and manner softened from an unmistakably stiffening.
MacGonigal seemed to regard this personal inquiry anent his well-
being as affording a safe means of escape from a dilemma. “I’m
scairt about you, Derry,” he said at once, and there was no doubting
the sincerity of the words.
“About me?”
“Yep. Guess you’d better hike back to Sacramento.”
“But why?”
“Marten ’ud like it.”
“Man, I’ve written to tell him I was on the way to Denver!”
“Then git a move on, an’ go thar.”
Power smiled, though not with his wonted geniality, for he was
minded to be sarcastic. “Sorry if I should offend the boss by turning
up in Bison,” he drawled; “but if I can’t hold this job down I’ll
monkey around till I find another. If you should happen to see
Marten this afternoon, tell him I’m at the ranch, and will show up in
Main Street tomorrow P.M.”
He was actually turning on his heel when MacGonigal cried:
“Say, Derry, air you heeled?”
Power swung round again, astonishment writ large on his face.
“Why, no,” he said. “I’m not likely to be carrying a gold brick to
Dolores. Who’s going to hold me up?”
“Bar jokin’, I wish you’d vamoose. Dang me, come back tomorrer,
ef you must!”
There! MacGonigal had said it! In a land where swearing is a
science this Scoto-Hibernico-American had earned an enviable
repute for the mildness of his expletives, and his “dang me!” was as
noteworthy in Bison as its European equivalent in the mouth of a
British archbishop. Power was immensely surprised by his bulky
friend’s emphatic earnestness, and cudgeled his brains to suggest a
reasonable explanation. Suddenly it occurred to him a second time
that Bison was singularly empty of inhabitants that day. MacGonigal’s
query with regard to a weapon was also significant, and he
remembered that when he left the district there was pending a grave
dispute between ranchers and squatters as to the inclosing of certain
grazing lands on the way to the East and its markets.
“Are the boys wire-cutting today?” he asked, in the accents of real
concern; for any such expedition would probably bring about a
struggle which might not end till one or both of the opposing parties
ran short of ammunition.
“Nit,” growled the other. “Why argy? You jest take my say-so,
Derry, an’ skate.”
“Is the boss mixed up in this?”
“Yep.”
“Well, he can take care of himself as well as anyone I know. So
long, Mac. See you later.”
“Ah, come off, Derry. You’ve got to have it; but don’t say I didn’t
try to help. The crowd are up at Dolores. Marten’s gittin’ married, an’
that’s all there is to it. Now I guess you’ll feel mad with me for not
tellin’ you sooner.”
Power’s face blanched under its healthy tan of sun and air; but his
voice was markedly clear and controlled when he spoke, which,
however, he did not do until some seconds after MacGonigal had
made what was, for him, quite an oration.
“Why should Marten go to Dolores to get married?” he said at last.
The storekeeper humped his heavy shoulders, and conjured the
cigar across his mouth again. He did not flinch under the sudden fire
which blazed in Power’s eyes; nevertheless, he remained silent.
“Mac,” went on the younger man, still uttering each word
deliberately, “do you mean that Marten is marrying Nancy Willard?”
“Yep.”
“And you’ve kept me here all this time! God in Heaven, Man, find
me a horse!”
“It’s too late, Derry. They was wed three hours sence.”
“Too late for what? Get me a horse!”
“There’s not a nag left in Bison. An’ it’ll do you no sort of good ter
shoot Marten.”
“Mac, you’re no fool. He sent me to Sacramento to have me out of
the way, and you’ve seen through it right along.”
“Maybe. But old man Willard was dead broke. This dry spell put
him slick under the harrow. Nancy married Marten ter save her
father.”
“That’s a lie! They made her believe it, perhaps; but Willard could
have won through as others have done. That scheming devil Marten
got me side-tracked on purpose. He planned it, just as David put
Uriah in the forefront of the battle. But, by God, he’s not a king, any
more than I’m a Hittite! Nancy Willard is not for him, nor ever will
be. Give me—but I know you won’t, and it doesn’t matter, anyway,
because I’d rather tear him with my hands.”
An overpowering sense of wrong and outrage had Power in its grip
now, and his naturally sallow skin had assumed an ivory whiteness
that was dreadful to see. So rigid was his self-control that he gave
no other sign of the passion that was convulsing him. Turning
toward the door, he thrust his right hand to the side of the leather
belt he wore; but withdrew it instantly, for he was a law-abiding
citizen, and had obeyed in letter and spirit the recently enacted
ordinance against the carrying of weapons. He would have gone
without another word had not MacGonigal slipped from behind the
counter with the deft and catlike ease of movement which some
corpulent folk of both sexes seem to possess. Running lightly and
stealthily on his toes, he caught Power’s arm before the latter was
clear of the veranda which shaded the front of the store.
“Whar ’r you goin’, Derry?” he asked, with a note of keen
solicitude in his gruff voice that came oddly in a man accustomed to
the social amenities of a mining camp.
“Leave me alone, Mac. I must be alone!” Then Power bent a
flaming glance on him. “You’ve told me the truth?” he added in a
hoarse whisper.
“Sure thing. You must ha passed the minister between here an’
the depot.”
“He had been there—to marry them?”
“Yep.”
“And everyone is up at the ranch, drinking the health of Marten
and his bride?”
“Guess that’s so.”
Power tried to shake off the detaining hand. “It’s a pity that I
should be an uninvited guest, but it can’t be helped,” he said
savagely. “You see, I was carrying out the millionaire’s orders—
earning him more millions—and I ought to have taken longer over
the job. And, Nancy too! What lie did they tell her about me? I
hadn’t asked her to be my wife, because it wouldn’t have been fair;
yet—but she knew! She knew! Let me go, Mac!”
MacGonigal clutched him more tightly. “Ah, say, Derry,” he cried
thickly, “hev’ you forgot you’ve left me yer mother’s address in San
Francisco? In case of accidents, you said. Well, am I ter write an’ tell
her you killed a man on his weddin’ day, and was hanged for it?”
“For the Lord’s sake, don’t hold me, Mac!”
The storekeeper, with a wisdom born of much experience, took his
hand off Power’s arm at once, but contrived to edge forward until he
was almost facing his distraught friend.
“Now, look-a here!” he said slowly. “This air a mighty bad
business; but you cahn’t mend it, an’ ef you go cavortin’ round in a
red-eyed temper you’ll sure make it wuss. You’ve lost the gal—never
mind how—an’ gittin’ a strangle hold on Marten won’t bring her
back. Yer mother’s a heap more to you ner that gal—now.”
One wonders what hidden treasury of insight into the deeps of
human nature MacGonigal was drawing on by thus bringing before
the mind’s eye of an unhappy son the mother he loved. But there
was no gainsaying the soundness and efficiency of his judgment.
Only half comprehending his friendly counselor’s purpose, Power
quivered like a high-spirited horse under the prick of a spur. He put
his hands to his face, as if the gesture would close out forever the
horrific vision which the memory of that gray-haired woman in San
Francisco was beginning to dispel. For the first time in his young life
he had felt the lust of slaying, and the instinct of the jungle thrilled
through every nerve, till his nails clenched and his teeth bit in a
spasm of sheer delirium.
MacGonigal, despite his present load of flesh, must have passed
through the fiery furnace himself in other days; for he recognized
the varying phases of the obsession against which Power was
fighting.
Hence, he knew when to remain silent, and, again, he knew when
to exorcise the demon, once and for all, by the spoken word. It was
so still there on that sun-scorched plateau that the mellow whistle of
an engine came full-throated from the distant railroad. The lame
horse, bothered by the tight bandage which Power had contrived out
of a girth, pawed uneasily in his stall. From the reduction works, half
a mile away, came the grinding clatter of a mill chewing ore in its
steel jaws. These familiar sounds served only to emphasize the
brooding solitude of the place. Some imp of mischief seemed to
whisper that every man who could be spared from his work, and
every woman and child able to walk, was away making merry at the
wedding of Hugh Marten and Nancy Willard.
The storekeeper must have heard that malicious prompting, and
he combated it most valiantly.
“Guess you’d better come inside, Derry,” he said, with quiet
sympathy. “You’re feelin’ mighty bad, an’ I allow you hain’t touched
a squar’ meal sence the Lord knows when.”
He said the right thing by intuition. The mere fantasy of the
implied belief that a quantity of cold meat and pickles, washed down
by a pint of Milwaukee lager, would serve as an emollient for raw
emotion, restored Power to his right mind. He placed a hand on
MacGonigal’s shoulder, and the brown eyes which met his friend’s no
longer glowered with frenzy.
“I’m all right now,” he said, in a dull, even voice; for this youngster
of twenty-five owned an extra share of that faculty of self-restraint
which is the birthright of every man and woman born and bred on
the back-bone of North America. “I took it pretty hard at first, Mac;
but I’m not one to cry over spilt milk. You know that, eh? No, I can’t
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!

ebookname.com

You might also like