100% found this document useful (6 votes)
277 views

(eBook PDF) Starting Out with C++: From Control Structures through Objects, Brief Version 8th Edition all chapter instant download

The document promotes ebookluna.com as a platform for seamless downloads of ebooks across various genres, including programming books like 'Starting Out with C++' and 'Starting Out with Java' in multiple editions. It provides links to specific ebook products and highlights the availability of different formats such as PDF, ePub, and MOBI. Additionally, it outlines the contents of the programming books, including chapters on fundamental programming concepts and techniques.

Uploaded by

dubiherzon
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 (6 votes)
277 views

(eBook PDF) Starting Out with C++: From Control Structures through Objects, Brief Version 8th Edition all chapter instant download

The document promotes ebookluna.com as a platform for seamless downloads of ebooks across various genres, including programming books like 'Starting Out with C++' and 'Starting Out with Java' in multiple editions. It provides links to specific ebook products and highlights the availability of different formats such as PDF, ePub, and MOBI. Additionally, it outlines the contents of the programming books, including chapters on fundamental programming concepts and techniques.

Uploaded by

dubiherzon
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/ 55

Experience Seamless Full Ebook Downloads for Every Genre at ebookluna.

com

(eBook PDF) Starting Out with C++: From Control


Structures through Objects, Brief Version 8th
Edition

https://ebookluna.com/product/ebook-pdf-starting-out-with-c-
from-control-structures-through-objects-brief-version-8th-
edition/

OR CLICK BUTTON

DOWNLOAD NOW

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


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

(eBook PDF) Starting Out with C++: From Control Structures


through Objects 8th Edition

https://ebookluna.com/product/ebook-pdf-starting-out-with-c-from-
control-structures-through-objects-8th-edition/

ebookluna.com

(eBook PDF) Starting Out with Java: From Control


Structures through Objects, 7th Edition

https://ebookluna.com/product/ebook-pdf-starting-out-with-java-from-
control-structures-through-objects-7th-edition/

ebookluna.com

(eBook PDF) Starting Out with C++ from Control Structures


to Objects 9th Edition

https://ebookluna.com/product/ebook-pdf-starting-out-with-c-from-
control-structures-to-objects-9th-edition/

ebookluna.com

(eBook PDF) Starting Out with Java: From Control


Structures through Data Structures 3rd Edition

https://ebookluna.com/product/ebook-pdf-starting-out-with-java-from-
control-structures-through-data-structures-3rd-edition/

ebookluna.com
(eBook PDF) Starting Out with Java: From Control
Structures through Data Structures 4th Edition

https://ebookluna.com/product/ebook-pdf-starting-out-with-java-from-
control-structures-through-data-structures-4th-edition/

ebookluna.com

(eBook PDF) Starting Out with C++: Early Objects 9th


Edition

https://ebookluna.com/product/ebook-pdf-starting-out-with-c-early-
objects-9th-edition/

ebookluna.com

Starting Out with C++: Early Objects 9th Edition by Tony


Gaddis (eBook PDF)

https://ebookluna.com/product/starting-out-with-c-early-objects-9th-
edition-by-tony-gaddis-ebook-pdf/

ebookluna.com

(eBook PDF) Starting Out with Java: Early Objects 5th


Edition

https://ebookluna.com/product/ebook-pdf-starting-out-with-java-early-
objects-5th-edition/

ebookluna.com

(eBook PDF) Starting Out with Java: Early Objects 5th


Global Edition

https://ebookluna.com/product/ebook-pdf-starting-out-with-java-early-
objects-5th-global-edition/

ebookluna.com
Contents

Preface xv

Chapter 1 Introduction to Computers and Programming 1


1.1 Why Program? 1
1.2 Computer Systems: Hardware and Software 2
1.3 Programs and Programming Languages 8
1.4 What Is a Program Made of? 14
1.5 Input, Processing, and Output 17
1.6 The Programming Process 18
1.7 Procedural and Object-Oriented Programming 22

Chapter 2 Introduction to C++ 27


2.1 The Parts of a C++ Program 27
2.2 The cout Object 31
2.3 The #include Directive 36
2.4 Variables and Literals 37
2.5 Identifiers 41
2.6 Integer Data Types 42
2.7 The char Data Type 48
2.8 The C++ string Class 52
2.9 Floating-Point Data Types 54
2.10 The bool Data Type 57
2.11 Determining the Size of a Data Type 58
2.12 Variable Assignments and Initialization 59
2.13 Scope 61
2.14 Arithmetic Operators 61
2.15 Comments 69
2.16 Named Constants 71
2.17 Programming Style 73

vii
viii Contents

Chapter 3 Expressions and Interactivity 83


3.1 The cin Object 83
3.2 Mathematical Expressions 89
3.3 When You Mix Apples and Oranges: Type Conversion 98
3.4 Overflow and Underflow 100
3.5 Type Casting 101
3.6 Multiple Assignment and Combined Assignment 104
3.7 Formatting Output 108
3.8 Working with Characters and string Objects 118
3.9 More Mathematical Library Functions 124
3.10 Focus on Debugging: Hand Tracing a Program 130
3.11 Focus on Problem Solving: A Case Study 132

Chapter 4 Making Decisions 149


4.1 Relational Operators 149
4.2 The if Statement 154
4.3 Expanding the if Statement 162
4.4 The if/else Statement 166
4.5 Nested if Statements 169
4.6 The if/else if Statement 176
4.7 Flags 181
4.8 Logical Operators 182
4.9 Checking Numeric Ranges with Logical Operators 189
4.10 Menus 190
4.11 Focus on Software Engineering: Validating User Input 193
4.12 Comparing Characters and Strings 195
4.13 The Conditional Operator 199
4.14 The switch Statement 202
4.15 More About Blocks and Variable Scope 211

Chapter 5 Loops and Files 227


5.1 The Increment and Decrement Operators 227
5.2 Introduction to Loops: The while Loop 232
5.3 Using the while Loop for Input Validation 239
5.4 Counters 241
5.5 The do-while Loop 242
5.6 The for Loop 247
5.7 Keeping a Running Total 257
5.8 Sentinels 260
5.9 Focus on Software Engineering: Deciding Which Loop to Use 261
5.10 Nested Loops 262
5.11 Using Files for Data Storage 265
5.12 Optional Topics: Breaking and Continuing a Loop 284

Chapter 6 Functions 299


6.1 Focus on Software Engineering: Modular Programming 299
6.2 Defining and Calling Functions 300
6.3 Function Prototypes 309
6.4 Sending Data into a Function 311
Contents ix

6.5 Passing Data by Value 316


6.6 Focus on Software Engineering: Using Functions in a
Menu-Driven Program 318
6.7 The return Statement 322
6.8 Returning a Value from a Function 324
6.9 Returning a Boolean Value 332
6.10 Local and Global Variables 334
6.11 Static Local Variables 342
6.12 Default Arguments 345
6.13 Using Reference Variables as Parameters 348
6.14 Overloading Functions 354
6.15 The exit() Function 358
6.16 Stubs and Drivers 361

Chapter 7 Arrays 375


7.1 Arrays Hold Multiple Values 375
7.2 Accessing Array Elements 377
7.3 No Bounds Checking in C++ 384
7.4 Array Initialization 387
7.5 The Range-Based for Loop 392
7.6 Processing Array Contents 396
7.7 Focus on Software Engineering: Using Parallel Arrays 404
7.8 Arrays as Function Arguments 407
7.9 Two-Dimensional Arrays 418
7.10 Arrays with Three or More Dimensions 425
7.11 Focus on Problem Solving and Program Design: A Case Study 427
7.12 If You Plan to Continue in Computer Science: Introduction to the
STL vector 429

Chapter 8 Searching and Sorting Arrays 457


8.1 Focus on Software Engineering: Introduction to Search Algorithms 457
8.2 Focus on Problem Solving and Program Design: A Case Study 463
8.3 Focus on Software Engineering: Introduction to Sorting Algorithms 470
8.4 Focus on Problem Solving and Program Design: A Case Study 477
8.5 If You Plan to Continue in Computer Science: Sorting and
Searching vectors 485

Chapter 9 Pointers 495


9.1 Getting the Address of a Variable 495
9.2 Pointer Variables 497
9.3 The Relationship Between Arrays and Pointers 504
9.4 Pointer Arithmetic 508
9.5 Initializing Pointers 510
9.6 Comparing Pointers 511
9.7 Pointers as Function Parameters 513
9.8 Focus on Software Engineering: Dynamic Memory Allocation 522
9.9 Focus on Software Engineering: Returning Pointers from Functions 526
9.10 Using Smart Pointers to Avoid Memory Leaks 533
9.11 Focus on Problem Solving and Program Design: A Case Study 536
x Contents

Chapter 10 Characters, C-Strings, and More About the string Class 547
10.1 Character Testing 547
10.2 Character Case Conversion 551
10.3 C-Strings 554
10.4 Library Functions for Working with C-Strings 558
10.5 C-String/Numeric Conversion Functions 569
10.6 Focus on Software Engineering: Writing Your Own
C-String-Handling Functions 575
10.7 More About the C++ string Class 581
10.8 Focus on Problem Solving and Program Design: A Case Study 590

Chapter 11 Structured Data 599


11.1 Abstract Data Types 599
11.2 Focus on Software Engineering: Combining Data into Structures 601
11.3 Accessing Structure Members 604
11.4 Initializing a Structure 608
11.5 Arrays of Structures 611
11.6 Focus on Software Engineering: Nested Structures 613
11.7 Structures as Function Arguments 617
11.8 Returning a Structure from a Function 620
11.9 Pointers to Structures 623
11.10 Focus on Software Engineering: When to Use ., When to Use ->,
and When to Use * 626
11.11 Unions 628
11.12 Enumerated Data Types 632

Chapter 12 Advanced File Operations 657


12.1 File Operations 657
12.2 File Output Formatting 663
12.3 Passing File Stream Objects to Functions 665
12.4 More Detailed Error Testing 667
12.5 Member Functions for Reading and Writing Files 670
12.6 Focus on Software Engineering: Working with Multiple Files 678
12.7 Binary Files 680
12.8 Creating Records with Structures 685
12.9 Random-Access Files 689
12.10 Opening a File for Both Input and Output 697

Chapter 13 Introduction to Classes 711


13.1 Procedural and Object-Oriented Programming 711
13.2 Introduction to Classes 718
13.3 Defining an Instance of a Class 723
13.4 Why Have Private Members? 736
13.5 Focus on Software Engineering: Separating Class Specification
from Implementation 737
13.6 Inline Member Functions 743
13.7 Constructors 746
13.8 Passing Arguments to Constructors 750
Contents xi

13.9 Destructors 758


13.10 Overloading Constructors 762
13.11 Private Member Functions 765
13.12 Arrays of Objects 767
13.13 Focus on Problem Solving and Program Design: An OOP Case Study 771
13.14 Focus on Object-Oriented Programming: Simulating Dice with Objects 778
13.15 Focus on Object-Oriented Programming: Creating an Abstract Array
Data Type 782
13.16 Focus on Object-Oriented Design: The Unified Modeling Language (UML) 785
13.17 Focus on Object-Oriented Design: Finding the Classes and Their
Responsibilities 788

Chapter 14 More About Classes 811


14.1 Instance and Static Members 811
14.2 Friends of Classes 819
14.3 Memberwise Assignment 824
14.4 Copy Constructors 825
14.5 Operator Overloading 831
14.6 Object Conversion 858
14.7 Aggregation 860
14.8 Focus on Object-Oriented Design: Class Collaborations 865
14.9 Focus on Object-Oriented Programming: Simulating the Game
of Cho-Han 869

Chapter 15 Inheritance, Polymorphism, and Virtual Functions 891


15.1 What Is Inheritance? 891
15.2 Protected Members and Class Access 900
15.3 Constructors and Destructors in Base and Derived Classes 906
15.4 Redefining Base Class Functions 918
15.5 Class Hierarchies 923
15.6 Polymorphism and Virtual Member Functions 929
15.7 Abstract Base Classes and Pure Virtual Functions 945
15.8 Multiple Inheritance 952

Appendix A: Getting Started with Alice 971


Appendix B: The ASCII Character Set 997
Appendix C: Operator Precedence and Associativity 999
Quick References 1001
Index 1003
Credit 1019

Online The following appendices are available at www.pearsonhighered.com/gaddis.


Appendix D: Introduction to Flowcharting
Appendix E: Using UML in Class Design
Appendix F: Namespaces
Appendix G: Passing Command Line Arguments
xii Contents

Appendix H: Header File and Library Function Reference


Appendix I: Binary Numbers and Bitwise Operations
Appendix J: Multi-Source File Programs
Appendix K: Stream Member Functions for Formatting
Appendix L: Answers to Checkpoints
Appendix M: Solutions to Odd-Numbered Review Questions
LOCATION OF VIDEONOTES IN THE TEXT
VideoNote

Chapter 1 Introduction to Flowcharting, p. 20


Designing a Program with Pseudocode, p. 20
Designing the Account Balance Program, p. 25
Predicting the Result of Problem 33, p. 26
Chapter 2 Using cout, p. 31
Variabe Definitions, p. 37
Assignment Statements and Simple Math Expressions, p. 62
Solving the Restaurant Bill Problem, p. 80
Chapter 3 Reading Input with cin, p. 83
Formatting Numbers with setprecision, p. 111
Solving the Stadium Seating Problem, p. 142
Chapter 4 The if Statement, p. 154
The if/else statement, p. 166
The if/else if Statement, p. 176
Solving the Time Calculator Problem, p. 221
Chapter 5 The while Loop, p. 232
The for Loop, p. 247
Reading Data from a File, p. 274
Solving the Calories Burned Problem, p. 293
Chapter 6 Functions and Arguments, p. 311
Value-Returnlng Functions, p. 324
Solving the Markup Problem, p. 366
Chapter 7 Accessing Array Elements With a Loop, p. 380
Passing an Array to a Function, p. 407
Solving the Chips and Salsa Problem, p. 448
Chapter 8 The Binary Search, p. 460
The Selection Sort, p. 474
Solving the Charge Account Validation Modification Problem, p. 492
Chapter 9 Dynamically Allocating an Array, p. 523
Solving the Pointer Rewrite Problem, p. 545
Chapter 10 Writing a C-String-Handling Function, p. 575
More About the string Class, p. 581
Solving the Backward String Problem, p. 594
(continued on the next page)
LOCATION OF VIDEONOTES IN THE TEXT (continued)
VideoNote

Chapter 11 Creating a Structure, p. 601


Passing a Structure to a Function, p. 617
Solving the Weather Statistics Problem, p. 652
Chapter 12 Passing File Stream Objects to Functions, p. 665
Working with Multiple Files, p. 678
Solving the File Encryption Filter Problem, p. 708
Chapter 13 Writing a Class, p. 718
Defining an Instance of a Class, p. 723
Solving the Employee Class Problem, p. 802
Chapter 14 Operator Overloading, p. 831
Class Aggregation, p. 860
Solving the NumDays Problem, p. 885
Chapter 15 Redefining a Base Class Function in a Derived Class, p. 918
Polymorphism, p. 929
Solving the Employee and Production-Worker Classes Problem, p. 963
Preface

Welcome to the Brief Version of Starting Out with C++: From Control Structures through
Objects, 8th edition. This book is intended for use in a one or two-semester C++ ­programming
sequence, or an accelerated one-semester course. Students new to programming, as well as
those with prior course work in other languages, will find this text beneficial. The funda-
mentals of programming are covered for the novice, while the details, pitfalls, and nuances
of the C++ language are explored in-depth for both the beginner and more experienced
student. The book is written with clear, easy-to-understand language, and it covers all the
necessary topics for an introductory programming course. This text is rich in example pro-
grams that are concise, practical, and real-world oriented, ensuring that the student not only
learns how to implement the features and constructs of C++, but why and when to use them.

Changes in the Eighth Edition


C++11 is the latest standard version of the C++ language. In previous years, while the stan-
dard was being developed, it was known as C++0x. In August 2011, it was approved by
the International Standards Organization (ISO), and the name of the standard was officially
changed to C++11. Most of the popular compilers now support the C++11 standard.
The new C++11 standard was the primary motivation behind this edition. Although this
edition introduces many of the new language features, a C++11 compiler is not strictly
required to use the book. As you progress through the book, you will see C++11 icons in the
margins, next to the new features that are introduced. Programs appearing in sections that
are not marked with this icon will still compile using an older compiler.
Here is a summary of the new C++11 topics that are introduced in this edition:
l The auto key word is introduced as a way to simplify complex variable definitions.
The auto key word causes the compiler to infer a variable’s data type from its initial-
ization value.
l The long long int and unsigned long long int data types, and the LL literal
suffix are introduced.
l Chapter 5 shows how to pass a string object directly to a file stream object’s open
member function, without the need to call the c_str() member function. (A discus-
sion of the c_str()function still exists for anyone using a legacy compiler.)

xv
xvi Preface

l The range-based for loop is introduced in Chapter 7. This new looping mechanism
automatically iterates over each element of an array, vector, or other collection,
without the need of a counter variable or a subscript.
l Chapter 7 shows how a vector can be initialized with an initialization list.
l The nullptr key word is introduced as the standard way of representing a null
pointer.
l Smart pointers are introduced in Chapter 9, with an example of dynamic memory
allocation using unique_ptr.
l Chapter 10 discusses the new, overloaded to_string functions for converting numeric
values to string objects.
l The string class’s new back() and front() member functions are included in
Chapter 10’s overview of the string class.
l Strongly typed enums are discussed in Chapter 11.
l Chapter 13 shows how to use the smart pointer unique_ptr to dynamically allocate
an object.
l Chapter 15 discusses the override key word and demonstrates how it can help prevent
subtle overriding errors. The final key word is discussed as a way of preventing a virtual
member function from being overridden.
In addition to the C++11 topics, the following general improvements were made:
l Several new programming problems have been added to the text, and many of the
existing programming problems have been modified to make them unique from previ-
ous editions.
l The discussion of early, historic computers in Chapter 1 is expanded.
l The discussion of literal values in Chapter 2 is improved.
l The introduction of the char data type in Chapter 2 is reorganized to use character
literals in variable assignments before using ASCII values in variable assignments.
l The discussion of random numbers in Chapter 3 is expanded and improved, with the
addition of a new In the Spotlight section.
l A new Focus on Object-Oriented Programming section has been added to Chapter 13,
showing how to write a class that simulates dice.
l A new Focus on Object-Oriented Programming section has been added to Chapter 14,
showing an object-oriented program that simulates the game of Cho-Han. The program
uses objects for the dealer, two players, and a pair of dice.

Organization of the Text


This text teaches C++ in a step-by-step fashion. Each chapter covers a major set of topics
and builds knowledge as the student progresses through the book. Although the chapters
can be easily taught in their existing sequence, some flexibility is provided. The diagram
shown in Figure P-1 suggests possible sequences of instruction.
Preface xvii

Figure P-1  

Chapter 1
Introduction

Chapters 2–7
Basic Language
Elements

Chapter 8 Chapter 9 Chapter 12


Searching and Pointers Advanced File
Sorting Arrays Operations*

*A few subtopics in
Chapter 12 require
Chapter 10 Chapters 9 and 11.
Characters, Strings, Chapter 11
and the string Class Structures

Chapter 13
Introduction to
Classes

Chapter 14
More About Classes

Chapter 15
Inheritance and
Polymorphism

Chapter 1 covers fundamental hardware, software, and programming concepts. You may
choose to skip this chapter if the class has already mastered those topics. Chapters 2 through
7 cover basic C++ syntax, data types, expressions, selection structures, repetition structures,
functions, and arrays. Each of these chapters builds on the previous chapter and should be
covered in the order presented.
After Chapter 7 has been covered, you may proceed to Chapter 8, or jump to either Chapter
9 or Chapter 12. (If you jump to Chapter 12 at this point, you will need to postpone sections
12.7, 12.8, and 12.10 until Chapters 9 and 11 have been covered.)
After Chapter 9 has been covered, either of Chapters 10 or 11 may be covered. After
­Chapter 11, you may cover Chapters 13 through 15 in sequence.
This text’s approach starts with a firm foundation in structured, procedural programming
before delving fully into object-oriented programming.
xviii Preface

Brief Overview of Each Chapter


Chapter 1: Introduction to Computers and Programming
This chapter provides an introduction to the field of computer science and covers the fun-
damentals of programming, problem solving, and software design. The components of pro-
grams, such as key words, variables, operators, and punctuation are covered. The tools of
the trade, such as pseudocode, flow charts, and hierarchy charts are also presented.

Chapter 2: Introduction to C++


This chapter gets the student started in C++ by introducing data types, identifiers, vari-
able declarations, constants, comments, program output, simple arithmetic operations, and
C-strings. Programming style conventions are introduced and good programming style
is modeled here, as it is throughout the text. An optional section explains the difference
between ANSI standard and pre-standard C++ programs.

Chapter 3: Expressions and Interactivity


In this chapter the student learns to write programs that input and handle numeric, char-
acter, and string data. The use of arithmetic operators and the creation of mathematical
expressions are covered in greater detail, with emphasis on operator precedence. Debug-
ging is introduced, with a section on hand tracing a program. Sections are also included on
simple output formatting, on data type conversion and type casting, and on using library
functions that work with numbers.

Chapter 4: Making Decisions


Here the student learns about relational operators, relational expressions and how to con-
trol the flow of a program with the if, if/else, and if/else if statements. The condi-
tional operator and the switch statement are also covered. Crucial applications of these
constructs are covered, such as menu-driven programs and the validation of input.

Chapter 5: Loops and Files


This chapter covers repetition control structures. The while loop, do-while loop, and for
loop are taught, along with common uses for these devices. Counters, accumulators, run-
ning totals, sentinels, and other application-related topics are discussed. Sequential file I/O
is also introduced. The student learns to read and write text files, and use loops to process
the data in a file.

Chapter 6: Functions
In this chapter the student learns how and why to modularize programs, using both void
and value returning functions. Argument passing is covered, with emphasis on when argu-
ments should be passed by value versus when they need to be passed by reference. Scope of
variables is covered, and sections are provided on local versus global variables and on static
local variables. Overloaded functions are also introduced and demonstrated.
Preface xix

Chapter 7: Arrays
In this chapter the student learns to create and work with single and multidimensional
arrays. Many examples of array processing are provided including examples illustrating
how to find the sum, average, highest, and lowest values in an array and how to sum the
rows, columns, and all elements of a two-dimensional array. Programming techniques using
parallel arrays are also demonstrated, and the student is shown how to use a data file as
an input source to populate an array. STL vectors are introduced and compared to arrays.

Chapter 8: Sorting and Searching Arrays


Here the student learns the basics of sorting arrays and searching for data stored in them.
The chapter covers the Bubble Sort, Selection Sort, Linear Search, and Binary Search algo-
rithms. There is also a section on sorting and searching STL vector objects.

Chapter 9: Pointers
This chapter explains how to use pointers. Pointers are compared to and contrasted with
reference variables. Other topics include pointer arithmetic, initialization of pointers, rela-
tional comparison of pointers, pointers and arrays, pointers and functions, dynamic mem-
ory allocation, and more.

Chapter 10: Characters, C-strings, and More About the string Class
This chapter discusses various ways to process text at a detailed level. Library functions for
testing and manipulating characters are introduced. C-strings are discussed, and the tech-
nique of storing C-strings in char arrays is covered. An extensive discussion of the string
class methods is also given.

Chapter 11: Structured Data


The student is introduced to abstract data types and taught how to create them using struc-
tures, unions, and enumerated data types. Discussions and examples include using pointers
to structures, passing structures to functions, and returning structures from functions.

Chapter 12: Advanced File Operations


This chapter covers sequential access, random access, text, and binary files. The various
modes for opening files are discussed, as well as the many methods for reading and writing
file contents. Advanced output formatting is also covered.

Chapter 13: Introduction to Classes


The student now shifts focus to the object-oriented paradigm. This chapter covers the fun-
damental concepts of classes. Member variables and functions are discussed. The student
learns about private and public access specifications, and reasons to use each. The topics of
constructors, overloaded constructors, and destructors are also presented. The chapter pres-
ents a section modeling classes with UML and how to find the classes in a particular problem.
xx Preface

Chapter 14: More About Classes


This chapter continues the study of classes. Static members, friends, memberwise assign-
ment, and copy constructors are discussed. The chapter also includes in-depth sections on
operator overloading, object conversion, and object aggregation. There is also a section on
class collaborations and the use of CRC cards.

Chapter 15: Inheritance, Polymorphism, and Virtual Functions


The study of classes continues in this chapter with the subjects of inheritance, polymor-
phism, and virtual member functions. The topics covered include base and derived class con-
structors and destructors, virtual member functions, base class pointers, static and dynamic
binding, multiple inheritance, and class hierarchies.

Appendix A: Getting Started with Alice


This appendix gives a quick introduction to Alice. Alice is free software that can be used to
teach fundamental programming concepts using 3D graphics.

Appendix B: ASCII Character Set


A list of the ASCII and Extended ASCII characters and their codes.

Appendix C: Operator Precedence and Associativity


A chart showing the C++ operators and their precedence.

The following appendices are available online at www.pearsonhighered.com/gaddis.

Appendix D: Introduction to Flowcharting


A brief introduction to flowcharting. This tutorial discusses sequence, selection, case, repeti-
tion, and module structures.

Appendix E: Using UML in Class Design


This appendix shows the student how to use the Unified Modeling Language to design
classes. Notation for showing access specification, data types, parameters, return values,
overloaded functions, composition, and inheritance are included.

Appendix F: Namespaces
This appendix explains namespaces and their purpose. Examples showing how to define a
namespace and access its members are given.

Appendix G: Passing Command Line Arguments


Teaches the student how to write a C++ program that accepts arguments from the command
line. This appendix will be useful to students working in a command line environment, such
as Unix, Linux, or the Windows command prompt.

Appendix H: Header File and Library Function Reference


This appendix provides a reference for the C++ library functions and header files discussed
in the book.
Preface xxi

Appendix I: Binary Numbers and Bitwise Operations


A guide to the C++ bitwise operators, as well as a tutorial on the internal storage of integers.

Appendix J: Multi-Source File Programs


Provides a tutorial on creating programs that consist of multiple source files. Function
header files, class specification files, and class implementation files are discussed.

Appendix K: Stream Member Functions for Formatting


Covers stream member functions for formatting such as setf.

Appendix L: Answers to Checkpoints


Students may test their own progress by comparing their answers to the checkpoint exer-
cises against this appendix. The answers to all Checkpoints are included.

Appendix M: Solutions to Odd-Numbered Review Questions


Another tool that students can use to gauge their progress.

Features of the Text


Concept Each major section of the text starts with a concept statement.
Statements This statement summarizes the ideas of the section.
Example Programs The text has hundreds of complete example programs, each
designed to highlight the topic currently being studied. In most
cases, these are practical, real-world examples. Source code for
these programs is provided so that students can run the programs
themselves.
Program Output After each example program there is a sample of its screen
output. This immediately shows the student how the program
should function.
In the Spotlight Each of these sections provides a programming problem and a
detailed, step-by-step analysis showing the student how to
solve it.
VideoNotes A series of online videos, developed specifically for this book, is
VideoNote available for viewing at www.pearsonhighered.com/gaddis.
Icons appear throughout the text alerting the student to videos
about specific topics.
Checkpoints Checkpoints are questions placed throughout each chapter as
a self-test study aid. Answers for all Checkpoint questions can
be downloaded from the book’s Companion Web site at www.
pearsonhighered.com/gaddis. This allows students to check how
well they have learned a new topic.
Notes Notes appear at appropriate places throughout the text. They are
short explanations of interesting or often misunderstood points
relevant to the topic at hand.
xxii Preface

Warnings Warnings are notes that caution the student about certain C++
features, programming techniques, or practices that can lead to
malfunctioning programs or lost data.
Case Studies Case studies that simulate real-world applications appear in
many chapters throughout the text. These case studies are de-
signed to highlight the major topics of the chapter in which they
appear.
Review Questions Each chapter presents a thorough and diverse set of review
and Exercises questions, such as fill-in-the-blank and short answer, that check
the student’s mastery of the basic material presented in the chap-
ter. These are followed by exercises requiring problem solving
and analysis, such as the Algorithm Workbench, Predict the Out-
put, and Find the Errors sections. Answers to the odd-numbered
review questions and review exercises can be downloaded from
the book’s Companion Web site at www.pearsonhighered.com/
gaddis.
Programming Each chapter offers a pool of programming exercises designed
Challenges to solidify the student’s knowledge of the topics currently being
studied. In most cases the assignments present real-world prob-
lems to be solved. When applicable, these exercises include input
validation rules.
Group Projects There are several group programming projects throughout the
text, intended to be constructed by a team of students. One
student might build the program’s user interface, while another
student writes the mathematical code, and another designs and
implements a class the program uses. This process is similar to
the way many professional programs are written and encourages
team work within the classroom.
Software Available for download from the book’s Companion Web site at
Development www.pearsonhighered.com/gaddis. This is an ongoing project
Project: that instructors can optionally assign to teams of students. It
Serendipity systematically develops a “real-world” software package: a
Booksellers point-of-sale program for the fictitious Serendipity Booksellers
organization. The Serendipity assignment for each chapter adds
more functionality to the software, using constructs and tech-
niques covered in that chapter. When complete, the program will
act as a cash register, manage an inventory database, and produce
a variety of reports.
C++ Quick For easy access, a quick reference guide to the C++ language is
Reference Guide printed on the last two pages of Appendix C in the book.

11 C++11 Throughout the text, new C++11 language features are


­introduced. Look for the C++11 icon to find these new features.
Preface xxiii

Supplements
Student Online Resources
Many student resources are available for this book from the publisher. The following items
are available on the Gaddis Series Companion Web site at www.pearsonhighered.com/gaddis:
l The source code for each example program in the book
l Access to the book’s companion VideoNotes
l A full set of appendices, including answers to the Checkpoint questions and answers
to the odd-numbered review questions
l A collection of valuable Case Studies
l The complete Serendipity Booksellers Project

Online Practice and Assessment with MyProgrammingLab


MyProgrammingLab helps students fully grasp the logic, semantics, and syntax of pro-
gramming. Through practice exercises and immediate, personalized feedback, MyProgram-
mingLab improves the programming competence of beginning students who often struggle
with the basic concepts and paradigms of popular high-level programming languages.
A self-study and homework tool, a MyProgrammingLab course consists of hundreds of
small practice exercises organized around the structure of this textbook. For students, the
system automatically detects errors in the logic and syntax of their code submissions and
offers targeted hints that enable students to figure out what went wrong—and why. For
instructors, a comprehensive gradebook tracks correct and incorrect answers and stores the
code inputted by students for review.
MyProgrammingLab is offered to users of this book in partnership with Turing’s Craft, the
makers of the CodeLab interactive programming exercise system. For a full demonstration,
to see feedback from instructors and students, or to get started using MyProgrammingLab
in your course, visit www.myprogramminglab.com.

Instructor Resources
The following supplements are available to qualified instructors only:
• Answers to all Review Questions in the text
• Solutions for all Programming Challenges in the text
• PowerPoint presentation slides for every chapter
• Computerized test bank
• Answers to all Student Lab Manual questions
• Solutions for all Student Lab Manual programs
Visit the Pearson Instructor Resource Center (www.pearsonhighered.com/irc) for
information on how to access instructor resources.
xxiv Preface

Textbook Web site


Student and instructor resources, including links to download Microsoft® Visual Studio
Express and other popular IDEs, for all the books in the Gaddis Starting Out With series
can be accessed at the following URL:
http://www.pearsonhighered.com/gaddis

Get this book the way you want it!


This book is part of Pearson Education’s custom database for Computer Science textbooks.
Use our online PubSelect system to select just the chapters you need from this, and other,
Pearson Education CS textbooks. You can edit the sequence to exactly match your course
organization and teaching approach. Visit www.pearsoncustom.com/cs for details.

Which Gaddis C++ book is right for you?


The Starting Out with C++ Series includes three books, one of which is sure to fit your course:
l Starting Out with C++: From Control Structures through Objects
l Starting Out with C++: Early Objects
l Starting Out with C++: Brief Version
The following chart will help you determine which book is right for your course.

■ FROM CONTROL STRUCTURES ■ EARLY OBJECTS


THROUGH OBJECTS
■ BRIEF VERSION
LATE INTRODUCTION OF OBJECTS EARLIER INTRODUCTION OF OBJECTS
Classes are introduced in Chapter 13 of the stan- Classes are introduced in Chapter 7, after
dard text and Chapter 11 of the brief text, after control structures and functions, but before
control structures, functions, arrays, and pointers. arrays and pointers. Their use is then
Advanced OOP topics, such as inheritance and integrated into the remainder of the text.
polymorphism, are covered in the following two Advanced OOP topics, such as inheritance
chapters. and polymorphism, are covered in Chapters
11 and 15.

INTRODUCTION OF DATA STRUCTURES INTRODUCTION OF DATA STRUCTURES


AND RECURSION AND RECURSION
Linked lists, stacks and queues, and binary trees Linked lists, stacks and queues, and binary
are introduced in the final chapters of the standard trees are introduced in the final chapters of
text. Recursion is covered after stacks and queues, the text, after the chapter on recursion.
but before binary trees. These topics are not
covered in the brief text, though it does have
appendices dealing with linked lists and recursion.
Random documents with unrelated
content Scribd suggests to you:
There is another form of temptation against which it is much
easier for the religious propagandist to guard, but which has been
rather unusually strong and pervasive in the recent history of Korean
missions. This is the temptation to under-estimate, or even despise,
the auxiliaries which are offered by an improved condition of the
material, legal, and educational facilities to the more definitively
religious uplift of the people. The missionary can contribute the
share of religion to progress and reform; and he can make that a
large share. But it is safe and wise for him not to under-estimate or
despise the support of the civil arm. Korea is to-day, as has been
already shown in detail, a land unblessed by any of the institutions
of a prosperous and equitable civil government of the modern
Christian type, established and fostered by its own ruling classes.
The multitude of its people are even more than its rulers incapable
of taking the initiative in founding such institutions. The dawning of
the very idea of good government has scarcely as yet risen upon
them.
Early Christianity was propagated in the Roman world largely by
making available for its uses the means furnished by the Roman
Empire. And the early Christians were expressly enjoined to welcome
all the support offered from, and to offer their support to, whatever
was good and helpful in the existing civil government. It is then a
conceit which is unwarranted by the history of the Christian church
that makes the missionary think, by “preaching the Gospel” to effect
all which is necessary toward reforming a nation in the condition of
Korea at the present time. Moreover, the claim that it was
Christianity—especially in the form of a so-called preaching of the
Gospel—which, unaided by other historical and moral forces, gave to
the Western world its “democratic” advantages, is no longer tenable.
The experience with Coptic Christianity in Egypt, with Armenian
Christianity in Western Asia, with the Greek Church in Holy Russia,
and with Roman Catholicism in Spain and South America (not to
mention other notable examples) contradicts this claim. In Korea
itself it is not the Christian Missionary who is building railways,
making harbors, planting lighthouses, devising a legal code,
introducing a sound currency, and attempting the task of reforming
the finances, the judiciary, the police, and the local magistracy. Even
granted that he is setting at work moral and spiritual forces which
will ultimately bring to pass all these public benefits, it would take
five hundred years for Korea without foreign assistance from other
forms of civilizing energy, to secure these benefits. It is with no
intention to depreciate the work of missions in Korea that attention
is called to this obvious fact; its workmen had very unusual
opportunities to assist in improving the moral character of the
Emperor, the late Queen, the Court, and the other officials; and yet
they signally failed in this regard. Nor could they, unaided by the civil
arm of foreign powers, accomplish much toward relieving the
miserable and oppressed and immoral conditions of living prevalent
among the common people of Korea. Just here, however—that is, in
the sphere of moral and spiritual influence upon personal character,
whether of prince or peasant—is where the influence of religion
ought to show itself supreme. The “purification” of Korea required,
and still requires, the firm, strong hand of the civil power. We
cannot, then, credit any such sentiment as that expressed in the
following statement:[93] “The influence of Christianity, so largely and
rapidly increasing in the country, holds out a better prospect of
spontaneous reform than the outside, violent interference of a
money-grabbing and hated heathen enemy.” In answer to every
such expression of sentiment, the protestation of the Resident-
General has been perfectly clear; and as fast and as far as his
influence could make itself felt, the conduct of affairs has confirmed
the protestation: “It is Japan’s honest and sincere purpose to make
of the Koreans a self-reliant and respectable people. Let there be an
end, then, to the malign and mischief-making efforts to alienate the
Koreans from those who to-day are through the sure work of History
charged with responsibility for this nation.”[94]
It would seem, then, that prompt, open, and hearty co-operation
with all the efforts, of every kind, made by the Japanese
Protectorate to lift up the Korean people is the only truly wise and
Christian policy on the part of the missions in Korea.[95]
How far the Korean missionaries have yielded to these and other
temptations and have behaved unwisely toward the Japanese
Government and before their Korean converts, it is not our purpose
to discuss in detail. And yet we cannot avoid all reference to this
delicate and unwelcome theme. Wholesale charges of political
intrigue and other unbecoming conduct directed against the
Residency-General have been met by emphatic and equally
wholesale denials—especially during the troubled times of 1906 and
1907. The charges, on the one hand, have been made not simply by
an irresponsible Japanese press, but by several of the more
reputable and generally trustworthy of its papers. On the other
hand, all similar charges are met by Bishop M. C. Harris[96] with the
assurance “because of full knowledge of the situation in Korea
covering the space of three years,” “that no American missionary has
been identified with political movements,” ... but that “in all the far-
reaching plans of the Residency-General to promote the welfare of
Korea and Japan as well, the missionaries are in hearty accord.” Yet
again, on the other side, repeated representations of a quite
opposite character to that of Bishop Harris have frequently
appeared, both in letters and papers, in the United States and in
England.
The exact truth is with neither of these contentions; to appreciate
it one must bear in mind the difficult situation in which the
missionaries in Korea have been placed. All the wrongs (as their
story has been told in the last chapter), real or fancied, important
and trivial but true, or important and trivial but falsely alleged, have
been appealed to them by their Korean converts and also by Korean
adventurers, with claims for sympathy and for assistance. What was
said of the Cretans in old times may be said of the Koreans to-day:
they are liars quite generally. Even when they do not intend
deliberately to deceive, they find it impossible to refrain from gross
exaggeration. On the other hand, the missionaries, where their
sympathies are wrought upon by their own children in the faith—all
the more on account of the mental and moral weakness of those
children—are apt to be over-credulous, and are not always sane in
judgment or prudent in conduct. These virtues are perhaps too
much to expect; perhaps they are not even the appropriate virtues
for a Christian woman when one of her own sex exposes bruises
which she alleges to have been inflicted by the hands of a “heathen
coolie.” At such moments it is not easy to remember the deeds of
her own countrywomen in the South, or of her own countrymen in
San Francisco, in the Philippines, or in South Africa.
Furthermore, it cannot be truthfully claimed that none of the
missionaries have ever meddled in politics with a view to injure the
Japanese Government in Korea. It was, in fact, an American
missionary who, after one of his colleagues upon the mission field,
while expressing his sympathy with the Korean Emperor, had refused
to send a secret telegram asking for interference from the President
of the United States, did send such a telegram; and when sternly
rebuked by the diplomatic representative of his own nation for
conduct so unbecoming to his profession, he replied with an
assertion of the right to do as he pleased in all such matters. Others
have, from time to time, allowed themselves to be used by the more
wily Korean, whether un-Christian official or Christian convert, so as
to involve themselves in implied complicity with political intrigues. If
it is a mistake—or even worse than a mistake—to circulate reports of
evil without examination into their accuracy, and to allow in all one’s
attitude toward the powers that be, unverified suspicions and secret
hostilities to dominate, then a considerable number of the
missionary body in Korea must plead guilty in the past to this
mistake. But most of all has this body suffered from its failure to
disavow and practically to dissolve all connection with those other
“foreign friends” of Korea who have during the past few years
brought upon her Emperor and her people much more of misery and
of harm than has been wrought by all the irresponsible and
disreputable Japanese adventurers taken together.
A marked improvement, however, in the relations between the
missionaries and the Japanese Government in Korea has
characterized the treatment of the more recent events. For, although
there was inevitably a certain intensifying of hostile feeling by the
uprising and bloodshed that followed the Convention of July, 1907,
the active co-operation of the most influential majority of the
missionaries in the plans of the Residency-General for the future
welfare of the Korean people seemed to have been by this time
assured. During the recent troublous times—in spite of charges to
the contrary—they appear to have remained, almost without
exception, faithful to their true calling and reasonably effective in
limiting or preventing the yet sorer evils that might have followed
the abdication of the Emperor, the disbandment of the Korean army,
and the tightening of Japan’s grip upon Korean internal affairs. With
certain, not very numerous, exceptions—and those mostly among
the spurious Christians who used the title only as a cover of selfish
or foolish political aims—the converts also acquitted themselves well.
The Korean Christians and their foreign leaders were favored by the
Japanese Government with special protection when the mad and
cruel Korean mob rose up, in veritable ancient fashion, to plunder
and to murder atrociously, in spots favorable to such activity
throughout the land. Thus in the emergency which, thanks to the
wisdom of both kinds of reforming and restraining forces, was after
all far less great than might have been expected, Korea made at
comparatively small expense a great step forward toward the
position of a truly civilized and prosperous nation. And if these same
two forces—the economical and judicial, backed by the police and
the military, and the moral and spiritual force on which Christianity
relies—continue to work in accord, as we may hope they will, the full
redemption of Korea in the nearer future is assured.
Of the administrative mistakes which have hindered the progress
of modern missions elsewhere there appear to have been
comparatively few in Korea. Among such mistakes, perhaps the
following two are most important: first, the failure to occupy strongly
certain strategic centres with missionary institutions, and to
postpone the occupation of other less important places for the work
of the trained native helper, Bible-reader, evangelist, or pastor; and,
second, the rivalries and waste of denominational jealousy and
exclusiveness. In Korea, the two cities of Seoul and Pyeng-yang have
wisely been selected as centres in which to build up a “plant” of
Christian institutions of various kinds—churches, schools, hospitals,
and seminaries for the training of native assistants. Further, the two
largest missionary bodies—namely, the American Methodists and
American Presbyterians, have worked together with admirable
respect for each other’s rights and in sincere co-operation.
There is one other matter of policy touching the administration of
missions which, in this connection, it is fitting to mention, but about
which anyone with the views of the writer might well hesitate to
express publicly an opinion. It is true, however, in the judgment of
many of the wisest friends of missions, that in the Far East the
sphere of woman in missionary work should be more carefully
guarded and even restricted. It is impossible to make the inhabitants
of the Orient, in general, understand the propriety of foreign women
being on terms of intimacy, even as religious teachers, with native
young men. On the other hand, women must, as a matter of course,
be employed in all the work of the most intimate character, and
within the home circle, which concerns their own sex. It is also true
that not a few of the most serious difficulties and perplexing cases of
friction between the missionaries and the diplomats and civil
magistrates, when traced to their real origin, are due to the more
personal and emotional way in which matters of public interest are
regarded by the gentler sex. The legitimate work of foreign Christian
women in the Far East is invaluable; but it should be private and
confined, for the most part if not exclusively, to intercourse with
native girls and women. In all administrative affairs, and in general
where the missions come into closest contact with the civil
authorities; it is better to-day, as it was in the days of early
Christianity, that her voice should not be heard.
The recent history of the planting and growth of Christian missions
in Korea shows a period of bloody persecution which was followed,
less than a score of years later, by a period of remarkably rapid
increase. In 1707 some French priests from Peking visited the
northern border of the peninsula, but were unable to enter the
country. It was three-quarters of a century later (1783) that Thomas
Kim, a Korean youth who had been converted to Christianity under
the Portuguese bishop, Alexandria de Gloria, came over from China
and succeeded in introducing the foreign religion into his native land.
A year later a royal decree was issued against Christianity, and
Thomas Kim was executed for his faith’s sake. But, although two
other Korean Christians who had been baptized in Peking were
beheaded in Seoul, December 8, 1791, the new religion began to
spread rapidly in Korea. The usual course of such efforts was being
run: others were executed, a new edict in 1802 was issued against
Christianity, and yet, “this added much to the knowledge of the
faith.” In 1836, Pierre Maubant, the second Papal nominee to the
post of Vicar Apostolic of Korea, reached Seoul after an arduous
journey; and when three years later still another murderous edict
was issued, this Christian Apostle and the two other French
missionaries who had subsequently joined him, under instruction
from one of the three, Bishop Imbert, surrendered themselves to
martyrdom in the hope of staying the persecution of their Korean
converts. Still Christianity continued to grow in the number of its
adherents; and by the year 1860, the foreign religion counted nearly
20,000 native converts. Then began, in the early part of 1866, the
infamous slaughter of the faithful under the Tai Won Kun, the father
of the “amiable” ex-Emperor, and the man “with the bowels of iron
and the heart of stone.” Within some five years about one-half of the
entire number of converts had paid the penalty with their lives.
It is not well to forget these facts of history in connection with our
estimate of the character of the Korean Government, the Korean
people, and the development of Christian Missions in Korea. Under
the son of this cruel father, the late Emperor, precisely the same
thing might have taken place at any time, had it been for his
interests, in his own sight, to have it so; and had it not been for his
fear of the consequences, after foreign control began to exercise
some restraint over native cruelty. It is foolish to suppose that the
religion or the life of the Protestant missionary, for example, who has
served the ex-Emperor as physician, are any dearer to His Majesty
than were the religion and the services of the French Roman
Catholic priests to the Tai Won Kun. The first thing, indeed, which
the earlier treaties with foreign nations demanded as their right was
the “free exercise of their religion in the treaty ports for the subjects
of the signatory Powers; nor to this day does any article,
expressly[97] sanctioning missionary enterprise, appear in any of the
treaties.” That the Emperor, when freed from the influence of the Tai
Won Kun, was in his youth somewhat sincerely inclined to a more
liberal policy toward foreign religions is undoubtedly true; but almost
as undoubtedly, that his kindness toward American missionaries has
been from a purely political motive and that his use of them has
been, not at all to learn the truths of the Christian religion, but to
discover through them new and improved methods of soliciting and
procuring “help” from so-called Christian nations.
In recent years, moreover, repeated instances have occurred of
the indisposition or inability of the Korean Government to protect
either the foreign missionaries or their native converts. During the
second Tong Hak uprising in the South, in May of 1894, the
American missionaries were called into Seoul for their safe
protection. The Chinese army in Korea during the Chino-Japan war
was everywhere a source of terror to the foreign preachers of
Christian doctrine and to their avowed Korean converts; and in July
of 1894 a French priest was murdered by Chinese soldiers at Kong
Hyen, near Asan. On the contrary, both the foreign and the native
Christians felt quite free from anxiety when the troops of Japan were
in control of Korean territory. The spirit of the official classes toward
the foreign religion was revealed in clear light when the Korean
Minister of Education, in October of 1896, issued a book entitled
“The Warp and Woof of Confucianism,” which was so offensive that it
was objected to by the Foreign Representatives in a body as being
disrespectful to them. In general, the capricious favors of an
unscrupulous monarch, who would readily and even gladly deliver to
death those whom he has tried to make, whether with success or
not, his tools to help carve a way through confining surroundings,
are a poor substitute for a system of law and justice, as a soil into
which to pour the seed of Christian truth.
There are said now to be thousands of native Roman-Catholic
Christians scattered about in the country of Korea. Many of the
priests, who are natives, live with their converts; but it is the policy
of the Church to have every one of its members visited once in each
year by his spiritual father. The French Catholic Cathedral (dedicated
May 29, 1898) and establishment is one of the most conspicuous
objects in Seoul. The archbishop in charge is an intelligent, kindly,
and devout man. While speaking with mild disapproval of the
treatment received by his converts a year or two before the arrival of
the Resident-General, and expressing his fear that the Koreans might
inevitably be driven to the wall by the multitudinous incoming of a
sturdier and more aggressive race, he gratefully admitted the
marked improvement in conditions which Marquis Ito was bringing
to pass. To “the Church,” however, all political institutions were
indifferent: Her work remained ever one and the same, and ever
equally secure.
The story of Protestant missionary enterprise in Korea since the
arrival, in June, 1883, on a tour of inspection, of Dr. R. S. McClay,
has been frequently told. It need not be repeated here; for the
purpose of this chapter is only to sketch in barest outline the
relations existing between the reforms planned by the Residency-
General and the welfare of Korea as depending upon the progress of
the Christian religion there. General Foote, who was then United
States Minister, presented to the Emperor a statement of the object
of the proposed mission which, it was understood, would be
encouraged to work most acceptably along medical and educational
lines. The summary of what has actually been accomplished along
these particular lines has already been given (Chap. XIV). Acting on
the suggestion of Dr. McClay, the Board of Missions of the Methodist
Episcopal Church in the United States sent out two missionaries, one
a graduate of the College of Physicians and Surgeons in New York
City (Dr. Scranton, who, after a long and useful service as a
missionary, has recently been made a Professor in the Government
Medical School), and the other a graduate of Drew Theological
Seminary, Mr. Henry Gerhardt Appenzeller. Before these gentlemen
reached Seoul the bloody events of 1884 had taken place. In 1887
followed Rev. George Heber Jones; and in the same year Rev.
Franklin Ohlinger was transferred from China to Korea. Other helpers
were added to this mission, as the demands of the work grew, until
the report for 1907 shows that forty-two foreign members and
thirty-five Korean preachers, ten of whom are ordained, are engaged
under its auspices in the work of propagating Christianity on Korean
soil. In recent years the more visible signs of success have greatly
increased. The summary of statistics presented before the Korean
Mission Conference at its session of June, 1906, was as follows: Full
members, 2,810; probationers, 9,981; Sunday Schools, 116, with
teachers and scholars numbering 8,943. But only a year later, the
total connection of the Church of this denomination in Korea was
given at 23,453—of which 19,570 were probationers—a gain over
the preceding year of 10,664, or nearly one hundred per cent.
During the same year 3,553 persons had been baptized.
It was on April 5, 1885, that Rev. H. G. Underwood of the
American Presbyterian Mission arrived and “formally opened
Protestant clerical mission work.” He was followed, on June 21st of
the same year, by J. W. Heron, M.D., who died in Seoul, July 26,
1890. To this mission other workmen were added from time to time;
and in November of 1892 a mission of the Southern Presbyterian
Church of America was started by Messrs. Junkin, Reynolds, and
Tate, and a Miss Davis. Still later, on September 7, 1898, three
clergymen of the Canadian Presbyterian Church—Messrs. Foote,
McRae, and Dr. Grierson—arrived to open a mission of this
denomination. These several Presbyterian missions have been, on
the whole, well supported from the churches at home, well manned,
and more than ordinarily successful in planting and upbuilding the
various classes of missionary institutions. The table compiled from
the council statistics of these missions for the year ending June 30,
1906, makes the following exhibit of results. The total number of
missionaries was then 77, of whom 41 were women, and 12 were
engaged in medical work. The native helpers numbered 373, of
whom 81 were unordained preachers, and 201 teachers (men), with
42 Bible women and women teachers. The fruits of these laborers
were 20 fully organized churches and 628 out-stations, or places of
“regular meeting,” of which 481 were put down as “entirely self-
supporting.” Connected with them were 12,546 communicants, of
which 2,811 had been added during the year, and 44,587
“adherents,” with 11,025 “catechumens” and 36,975 members of the
Sunday Schools. The average attendance upon these regular
meetings was 35,262; and the total of native contributions was
$27,418.89, as reckoned in United States gold. When the poverty of
the average Korean Christians and the difficulties of various kinds
which hinder them from the regular discharge of any of their
obligations are considered, this showing of attendance at church
services and of liberality in giving cannot be pronounced otherwise
than remarkable. The increase in every form of work since the
report, the statistics of which have just been quoted, is no less
remarkable in the Presbyterian Missions than in that of the Methodist
Episcopal Church.
These two American missions are, among those of the Protestant
churches, much the most active and successful in showing such
results as can take the form of a statistical exhibit. But other
missionary enterprises are worthy of mention. In September of 1890
Bishop Corfe (whose diocese was Korea and Shing-king, i. e.,
Manchuria) arrived at Seoul to establish a Church of England
Mission. He was preceded by Dr. Julius Wiles, Deputy Surgeon-
General Retired, who opened medical work for the mission and who
was succeeded in 1893 by Dr. E. H. Baldock. With the additional help
of other clergy and lay helpers, and of sisters of St. Paul’s, Kilburn,
the customary forms of church work—evangelizing, translating and
printing a Korean prayer-book and other publications, hospital work
and care of the poor and sick—have been undertaken with that rare
good sense and self-denial which characterize so much of the
missionary enterprise of this Church.
It was not until 1899, in the month of January, that the Russian
Church Mission arrived in Seoul. It consisted of the Rev. Deacon
Nicholas; and he was followed by the Right Rev. Archimandrite
Chrisanff and Mr. Jonas Levtchenke, Psalmist, on February 12, 1900.
The dwellings and school-houses for this mission were established
near the West Gate and were first occupied in the summer of the
same year.
No complete account or just estimate of the Christian forces now
at work for the religious and moral uplift of Korea could be given
without emphasizing the presence and fine progress of the Young
Men’s Christian Association at Seoul. The operations of this
association did not begin until November of 1901. Their work has
been much embarrassed in the country places by the illicit use of
their name to cover and commend various unwise and sometimes
corrupt and dangerous attempts at so-called “reform,” or even at
sedition and revolution. In Seoul itself—where is the only legitimate
and recognized Y. M. C. A.—some of their make-believe or would-be
friends have done their good cause much more of damage than has
been done by any of their avowed enemies. In spite of these
embarrassments, however, and of others to which fuller reference
need not be made in this connection, the work of this benevolent
association has been most successful. As we have already said, the
value of this work for the moral, industrial, and educational reform of
the Koreans has been officially recognized by a generous subsidy
from the Government. Its efficiency and extent cannot fail to be
greatly increased when its new building, so commodious and
centrally located, has been in use for a number of years. The writer
gratefully acknowledges that during his visit in April and May, of
1907, it was largely through the manly courage and good sense of
its foreign officers, and of that portion of its native official and other
membership which followed the lead of these foreign officers, that
he was able to leave any impression upon the Korean Christians.
Indeed, in the capital city, no other means were found for even
saying a private word to the Koreans in behalf of education, morals,
or religion. It was only when away from the pernicious influences of
the Court—notably at Pyeng-yang—that the courage of the
missionaries seemed sufficient to sustain a platform for such efforts,
on the part of the guest of Marquis Ito, in the churches themselves.
[98]

The “Great Revival” of 1906-1907, which added so much to the


encouragement of the missionaries and to the number of their
converts, can best be understood in its most characteristic features
when viewed in the light of what has already been said about the
nature of the Koreans themselves. After a period of silent and slow
preparation, a sudden seizure of the impulse to repent and confess
came upon the entire body of native Christians, and even carried
away the foreign teachers and preachers also. Night after night, and
several times each Sunday, the churches were crowded to
suffocation with hearers of their strange words, and witnesses of
their unwonted actions. Especially at Pyeng-yang did the people,
both Christian and non-Christian, flock in from the surrounding
country—first to “look-see,” perhaps, and then to participate in these
extraordinary performances. In numerous instances, the penitent
rose with an appearance of enforced calmness and began quietly to
tell of the sinful experiences of the years both preceding and
following his adoption of the Christian name. But as he proceeded
his excitement grew; his voice rose to a higher and yet higher pitch
and assumed a tone of ever-increasing shrillness; sobbing and
wailing intervened; and, finally, he began to sway to and fro, to beat
his head against the mats, sometimes so violently as to cause the
blood to flow; then he fell to the floor, where he ended his
experiences in a complete nervous collapse and lay prostrate,
frothing at the mouth and groaning piteously, or became quite
unconscious.
Funeral Procession in Seoul.

What may be considered as an official account by an eye-witness


of two of these remarkable meetings gives the following description
of the phenomena:

All were prostrate on their faces, and all alike, with the
exception of the few who had already received a blessing,
were in an agony of repentance. Sometimes they beat their
foreheads and hands against the floor, sometimes they
literally writhed in anguish, roaring as if the very devils were
tearing them; and then at last, when there seemed no more
power of resistance left, they would spring to their feet and
with terrible sobs and crying, pour out their confessions of
sin. And such confessions! It was like hell uncovered.
Everything from murder, adultery, and the most inconceivable
abominations of uncleanness, through arson, drunkenness,
robbery, thieving, lying, down to hatreds, spites, and
envyings, was emptied out, and with what shame and
loathing!
At the meeting of the second evening, before even the
leader took his place, the tide of prayer began rising, and
although three young men arose one after another, and
attempted to lead in prayer, their voices were not heard in the
tumult of intercessory supplication that broke out. As prayer
continued the building began to resound with groans and
cries. Many fell forward on their faces and wallowed on the
floor. When something like a semblance of order could be
restored, an opportunity was given to all who had any ill-
feeling toward any one present, or who had wronged any of
the others in any way, to make confession and ask
forgiveness. In a very few minutes the meeting was resolved
into numberless groups of students weeping in each other’s
arms. Nor did the members of the faculty escape; and it was
interesting to see them, with perhaps two or three boys
weeping at their knees, and others hanging about their necks.

In the later stages of the revival, those who went to mock


remained to be carried away by the same impulse; and when they
were exhorted by the foreign or native helpers, either at their place,
wedged in among the others (for the Korean audiences sit packed
together on the floor), or were dragged or helped forward to the
altar, they experienced the relief and happiness of “being converted.”
From the principal centres of this religious movement it spread to
surrounding places—sometimes through those who returned home
from these centres, sometimes through delegates sent out from the
same centres. One of the most remarkable of the latter cases was
the experience of the delegates deputed from Pyeng-yang to visit
Chemulpo. At first, when the church at the latter place saw the
brethren from the northern city, heard their tale, and witnessed their
testimony and procedure, they were greatly alarmed. It was even
suggested that one of the visiting brethren should be put to death as
an emissary of the devil, if not a devil himself. But the zeal of the
preachers from Pyeng-yang finally triumphed; and the church at
Chemulpo itself became the scene of similar confessions and
convulsions of penitence.
The student of similar phenomena in the past will have no
difficulty in understanding and appreciating at their true value the
experiences of the “great revival” in Korea. Similar emotional
manifestations are common enough on a variety of occasions, as
well in the Korea of the past as in the Korea of to-day. Indeed, at the
very time that the native Christians of Pyeng-yang were wailing and
sobbing, and beating their heads on the mats, on account of their
sins, the multitude of the same city were doing the same things
because they had been deceived into believing that their Emperor
was to be dethroned and carried off to Japan. From time
immemorial, the proper official way to attract the attention of His
Majesty to any request of his officials, or of the people, has been to
make somewhat similar demonstrations before the palace gates or
inside the palace walls. In a word, such is the Korean mode of
manifesting any strong emotional excitement.
But to discredit altogether the sincerity of these confessions or the
genuineness of the following conversion would be a no less grave
mistake, from every point of view, than to place a specially high
value on them because of their abnormal[99] psychological character.
It is not strange that the Korean populace is Korean still, when it
suddenly takes to some new kind of reform, or adopts some new
kind of religion. Such strong and contradictory, and even convulsive,
reactions characterize the native in his politics, his morals, his
religion, and his behavior generally. The amiably cruel Emperor, the
smiling and good-natured but, on occasion, atrociously barbarous
court official, the peasant who seems as gentle as his ox until he
turns upon the ox, or upon his neighbor, or upon the local
magistrate, to tear in pieces, reveal essentially the same psychical
characteristics.
But how, it may be asked, as to the kind of Christian father or
mother, Christian citizen, Christian leader, which will be evolved from
this multitude of converts? Here, again, the only fair and reasonable
answer will avoid the two alike tempting but, in the end,
disappointing extremes. During the writer’s stay in Korea, Dr. George
Heber Jones, who fifteen years before had been barred outside of
the gates, preached at Kang Wha to a congregation of fifteen
hundred willing hearers, about one thousand of whom were
professing Christians. Multitudes in the whole Island were just then
turning toward Christianity—entire schools and, in some instances,
almost entire villages, were professing the new faith. In their
burning zeal the converts were even resorting to a sort of boycott in
order to compel recalcitrants to the adoption of this foreign religion.
Yet when a colleague of this missionary, a member of the same
mission, was a few weeks later urged to baptize some sixty converts
in one village, he refused to comply with the request in the case of a
single person, because examination showed that none of the sixty
had as yet sufficient knowledge of what was really meant by
proclaiming themselves Christians.
Here, again, however, the student wise in the things of man’s
religious experience will not depreciate the value of such early but
ignorant steps, wherever they are taken from a motive not too
degradedly selfish, toward a higher spiritual life. The infancy of the
Church in Korea will, as a matter of course, be characterized by the
infantile condition of the Korean mind, united, alas! with a morality
that is far removed from the innocence customarily attributed to the
human infant. But already the later experiences of modern missions
fully authorizes the expectation that what Roman Catholicism earlier
did to fit the Koreans for martyrdom under the Tai Won Kun, will be
much surpassed in what the combined efforts of all the Christian
institutions now planted in Korea will do to fit her children for a
nobler and happier life under the Japanese Protectorate.
In fine, the Japanese Protectorate under the present Resident-
General, and the foreign Christian missionaries with their native
converts, command the two sources of power and influence which
must unitedly work for the uplift of the Korean nation. That His
Excellency, the Marquis Ito, takes this view of the matter, he has
both by speech and action made sufficiently clear. That the majority
of the missionary body are taking the same view of the same matter
is becoming every day more clear. If, through any honest difference
of opinion upon important matters of policy, the leaders of these two
forces should fail to co-operate in the future, it would be deplorable
indeed. But if either one of the two should, whether through
avoidable misunderstanding or because of the decline in an
intelligent and conscientious desire for the good of Korea, refuse to
co-operate, the refusal would be no less of a misfortune; it would be
also worthy to be called a crime.
CHAPTER XVIII
JULY, 1907, AND AFTERWARD

A telegram from The Hague to the Orient, bearing date of July 1,


1907, announced the arrival of three Koreans at the place of Peace
Conference, and the publication over their signatures, in a French
paper called The Peace Conference Times, of an open letter
addressed to the delegates of all the Powers. In their letter these
men claimed to have been authorized by the Emperor, in a
document bearing his seal, to take part in the Conference as the
delegates of Korea. In this connection they repeated the time-worn
falsehoods as to the conditions under which the Treaty of November,
1905, was signed, and as to the present treatment accorded by the
Japanese to the ruler and people of Korea. In view of these alleged
facts they made in behalf of their country an appeal for pity and for
relief to all the foreign delegates. As was inevitable from the
beginning, the efforts of this deputation at The Hague came to
naught; and after the death of one of their number they departed to
carry on their mission of appeal, first in England and afterward in the
United States. So thoroughly discredited, however, had the word of
such Koreans and of their “foreign friends” already become in the
hearing of all acquainted with the facts, that the mission met with as
little real success in these other foreign countries as at The Hague.
So far as its original purpose was concerned, it ended in failure—
miserable and complete. But in Korea itself the results were by no
means transient or trivial.
The news of the appearance of the so-called Korean delegates at
the World’s Peace Conference was received in Seoul on July 3d. It
will be remembered (see p. 83 f.) that—to quote from the Seoul
Press of the next day—“when Mr. H. B. Hulbert left for Europe under
peculiar circumstances, there were rumors that he was charged by
the Emperor of Korea with some political mission to The Hague.”
This paper then goes on to say that it did not attach much
importance to the rumor at the time, being unable to reconcile such
an enterprise with the reputation for shrewdness of the chief foreign
commissioner, and also “with the expressions of good will and
friendship which the Emperor of Korea has repeated to Japan and
her Representative over and over again.” But there were even more
important reasons why the rumor should seem antecedently
incredible. No one of the present Cabinet, or of the previously
existing Cabinet, appeared to have any knowledge of so serious an
affair of State; no one of either of these bodies had even been
consulted by His Majesty about the possibility of such an
undertaking. “Even the best informed did not dream that a step so
palpably useless and treacherous would be taken.” The conclusion
followed that, if the rumor proved true, the act was ascribable to the
Emperor alone, as “instigated no doubt by the coterie of
irresponsible native counsellors and their obscure foreign coadjutors
whose mischievous advice has already so often led His Majesty
astray.” Such a movement was rendered all the more untimely, not
to say unnecessary, because under the new Ministry and the wise
and kindly leadership of the Residency-General, all the foreign and
domestic affairs of the country were now proceeding in the most
orderly and satisfactory manner. Whatever ground for protest and
appeal against the treatment of Korea by the Japanese Government
may have existed in the past, everything in the situation of the
spring and early summer of 1907 called for hopeful and active co-
operation on the part of all forces interested in the welfare of the
land. The stirring of the elements always ready for riot, sedition,
arson, and bloodshed, was, under the circumstances, both a folly
and a crime.
On the morning of the same day on which the news of the affair
at The Hague reached Seoul, the Emperor sent the Minister of the
Imperial Household to Marquis Ito with a message disavowing all
responsibility for the delegation and for the protest addressed by it
to the Peace Conference. This was precisely what the delegation had
already informed all Europe His Korean Majesty would certainly do.
But then there was their word against the Emperor’s word; and they
claimed that the document in their possession bore the Imperial
seal. There was, moreover, for the very few who knew the
circumstances under which the alleged foreign member of the
delegation left Seoul, the previous private confession of His Majesty
made—to be sure—only after repeated private denials. The situation
was, therefore, so far as the testimony of Koreans went, rather
complex. His Majesty was now publicly denying what he had
formerly, in private, both affirmed and denied; his delegates were
publicly affirming what he was publicly denying, but had previously,
in private, both denied and affirmed. To the Minister of the Imperial
Household Marquis Ito replied that, in view of all the circumstances
which had come to his knowledge—not the least significant of which
was the public declaration of the Imperial sanction, made by the
delegation and supported by its offer to submit its credentials to the
inspection of the Conference—the force of His Majesty’s disavowal
was weakened. At any rate, the situation had now become so grave
that the only course the Resident-General could pursue was to
submit the whole matter to his own Government and await its
decision.[100]
The news from The Hague at once provoked a lively discussion on
the part of the Japanese press and the political parties as to the
proper treatment of Korea and her Emperor for this breach of treaty
faith. Meetings were held by the leaders of the principal parties to
determine the policy which should, in their judgment, be followed by
the Government; and several of the more prominent statesmen
allowed themselves to be interviewed for publication of their views
upon this important national affair. Count Okuma was reported as
having suggested that His Majesty of Korea, in case he had
authorized a scheme so lacking in common sense, could not be in
his right mind, and might, not improperly, be placed under restraint.
Count Inouye, whose successful management of Korean affairs at
the close of the Chino-Japan war entitled his judgment to public
confidence, thought that if the Emperor could be induced, or
compelled, to come to Japan and see for himself what Japan had
done by way of recent developments, and what Japan wished to do
for Korea, he would voluntarily cease from his unfriendly and
treacherous policy.[101] Of the political bodies, the Constitutionalists,
or party now in control of the Government, took the entire matter
most quietly, and expressed itself as entirely ready to leave the
whole situation in the hands of the Resident-General, as advised or
instructed by the Tokyo authorities. Prime Minister Saionji, to whose
cool judgment and quiet temper the nation is greatly indebted at all
times for allaying tendencies to undue excitement, assured the
Daido delegates, on July 12th, that the policy toward Korea had
already been established and that there was really no need of
making “much fuss” over the matter. The Progressives, or strongest
anti-Government party, took the most vehement position of urgency
for prompt action and for punitive measures. Some of its papers
went so far as again to call in question the entire policy of Marquis
Ito, with its plan for securing a peaceful development of Korea under
a Japanese Protectorate; but only a few called for immediate forcible
annexation.
On the whole, and considering the great and repeated
provocations offered to Japan by the Korean Emperor and his
Government, the Japanese nation kept its temper in a truly
admirable way. While agreeing that some means must at last be
found to stop the interference of His Majesty of Korea with all
attempts to reform internal affairs, and the better in the future to
control foreign intrigues, the general opinion favored strongly an
increased confidence in the character and policy of the existing
Residency-General. The situation in Japan itself was faithfully
described as follows in the Japan Times, in its issue of July 14th:

The Hague Deputation question continues to attract serious


attention. The whole Press is practically unanimous in urging
the adoption of such measures as would effectively prevent
the recurrence of similar incidents. The matter has also been
taken up by nearly all the important political parties, and the
attitude adopted by them is tantamount to an endorsement of
the view so unanimously expressed through the newspaper
organs. Very little attempt has been made, however, to point
out in a concrete form the line of action to be taken. It is
evident that, although a small section of the Press
unfavorably criticizes Marquis Ito’s leniency in dealing with the
Emperor, the important organs of opinion have so much
confidence in His Excellency’s ability to cope with the situation
with his characteristic wisdom and efficiency, that they do not
think it necessary to trouble him with suggestions at to
matters of procedure and detail.

The Tokyo Government acted with promptness and decision in


dealing with this latest phase of the everlasting Korean problem. On
July 16th it was publicly announced that the Government had
determined to “go along with the opinion of the people,” and adopt
“a strong line of action toward Korea.” Viscount Hayashi, Minister for
Foreign Affairs, was forthwith appointed to convey in person the
views of the Government to His Excellency Marquis Ito, and was
commissioned with the disposal of Korean affairs after consultation
with the Marquis on the spot. Hayashi bore with him several
somewhat different plans, among which decision was to be reached
after his arrival at Seoul; but all of them contemplated leaving the
details very largely to the Resident-General. It is pertinent to say,
with authority, in this connection, that none of these plans included,
much less suggested or required, the abdication of the Emperor;
although, as we have already seen, Marquis Ito had become quite
conclusively convinced that the reform of Korean affairs could never
be accomplished with the co-operation of the present ruler of the
land, or, indeed, otherwise than in spite of his utmost opposition.
Meantime there was a great stir taking place among the members
of the different political factions in Seoul. The Emperor himself, now
that his own foolish treachery had been brought to light, was daily
becoming more alarmed. The Court intriguers of necessity shared in
this growing alarm. Before the departure of Viscount Hayashi, the
Imperial Government of Japan had received a telegram from Mr.
Motono, Minister in St. Petersburg, which stated that the new Russo-
Japanese Convention would recognize Japan’s rights in Korea even
more completely than the Peace of Portsmouth had done. The fact,
now made evident to the Korean officials, that the backs of all the
nations were turned toward the verbal and practical falsehoods of
their Emperor and of his intriguing foreign friends, and that the
judgment of all those wise in respect of Korean history and Korean
characteristics saw no hope for their country except through the aid
of Japan, tended as a matter of course to deepen this alarm. And
when the determination of the Japanese Government to send one of
its Cabinet Ministers to Korea, in order at once and finally to put an
end to Korea’s power, in treachery, intrigue, and assassination, to
work her own woe and to jeopard the peace of the Far East, was
made known, the consternation in Seoul officialdom reached its
height.
The only persons among the Koreans who could be relied upon in
any measure to save the country from well-merited punishment for
this last act of insane treachery on the part of the Emperor and his
Court were the newly appointed Korean Cabinet. It was a great
piece of good fortune for Korea that this Cabinet had previously
been appointed and pledged to fidelity to the interests of the whole
country rather than to connivance at His Majesty’s intriguing ways.
On the whole, in this extreme emergency, the Korean Government
behaved wisely, patriotically, and in a way to secure the crown and
the people against the worst results of the Emperor’s policy. They
began their efforts, indeed, in the vain attempt to discover the plans
of the Japanese Government through the Resident-General and to
get His Excellency’s advice upon the best course of action on their
part in order to meet these plans. But Marquis Ito refrained alike
from indicating the steps which would probably be taken by Japan
and also from advising as to the steps which it was best for Korea to
take.
The Korean Ministers were by this time holding daily conferences
of several hours in length. The result of these conferences was the
conclusion on their part that the abdication of the Emperor offered
the only escape from the direful condition in which he had himself
placed his country. As early, therefore, as an audience on the 6th of
July, they began collectively and individually to urge upon His
Majesty the advisability of this step. There is no doubt that they
gave this advice the more heartily because, apart from the present
dilemma, they were profoundly convinced that he was a bad and
dangerous ruler, and that comparatively little could be done for the
improvement of Korean affairs as long as he sat upon the throne of
Korea. The occasion was opportune, then, for terminating such weak
misrule and perversion of Imperial power.
Viscount Hayashi arrived at Seoul on the evening of July 18th. In
the afternoon of the same day Marquis Ito visited the Palace at the
request of the Korean Emperor. He found that His Majesty had no
suggestions to make as to the solution of the grave problem before
the two governments: His Majesty continued, however, to disavow
the Hague delegation and to suggest the severe punishment of its
members.[102] The more important reason for the request for this
interview appeared when the Emperor stated that his Cabinet were
urging him to abdicate and suggested that he supposed they were
prompted to do so by Marquis Ito. This the Marquis emphatically
denied: so far as the Resident-General was concerned, the Korean
Cabinet were in all respects acting on their own initiative. His
Excellency was himself still awaiting the decision of his own
Government at Tokyo; and until that was announced he had nothing
to say as to what Japan was likely to do. Moreover, since he was not
a subject of the Emperor of Korea he should refrain from advising
His Majesty in any way about the matter of his abdication.[103]
Meantime the Korean Cabinet continued to press upon the
Emperor the necessity of his abdication in the interests of the
country at large. On Wednesday, July 17th, they proceeded in a
body to the Palace, where His Majesty is said to have kept them
waiting for their audience with him for nearly three hours. At this
audience, however, they again explained the nature of the present
crisis, and again besought him to save his country by sacrificing the
crown for himself. After a prolonged interview they are said to have
left the Emperor much enraged and still refusing. But on the next
day the Cabinet Ministers repaired again to the Palace at a quarter
to five in the afternoon. Before this meeting could be over the train
bearing the Viscount Hayashi would roll into the South-Gate Station.
The whole affair was culminating; the national crisis was imminent.
For more than three hours the Ministers pressed for their Sovereign’s
abdication, with a most bold and insistent attitude. It was after
eleven o’clock that evening when the Emperor began to show signs
of giving way, and ordered summons to be issued to assemble the
Elder Statesmen. These men soon arrived at the Palace and held a
secret conference among themselves, during which they, too, arrived
at the decision that there was really no alternative for the Emperor;
he should yield to the advice of his Ministers; and the throne was at
once memorialized to this effect. At three o’clock on the morning of
the nineteenth the Emperor agreed to retire in favor of the Crown
Prince, and a decree announcing this fact was published in the
Official Gazette at a later hour the same morning.
From about ten o’clock on Thursday night the people began to
assemble in front of the Palace. By one o’clock in the morning of
Friday the crowd had become dense and began to show threatening
signs of a riotous character; but they dispersed by degrees without
serious incidents, until at dawn scarcely one hundred men were
remaining in the neighborhood. Rumors of the Emperor’s abdication
were spread abroad after sunrise; and again the crowd of excited
people increased in front of the main gate of the Palace and in the
streets adjoining. A hand-bill, circulated from the same source of so
much pernicious misinformation—namely, the native edition of the
Korean Daily News—which asserted that the Emperor had been
deposed and was going to be carried off to Japan by Viscount
Hayashi, added greatly to the popular excitement. The Korean
police, under Police Adviser Maruyama, however, had the matter well
in hand; and having been earnestly advised by the Resident-General
to avoid all unnecessary harshness, they succeeded in dispersing the
people with only a few trifling encounters. In the work of restoring
order and preventing riot and bloodshed, the police were doubtless
greatly assisted by a timely downpour of rain. For of all people under
the sun it is probable that a Korean crowd of men, with their
expensive and cherished crinoline hats and their lustrous white
raiment, most object to getting thoroughly wet. Patriotism of the
intensest heat can scarcely bear this natural process of cooling.
At 7.15 p. m. on July 19th the Korean Minister of Justice called on
the Resident-General and delivered to him the following message
from His Majesty:

In abdicating my throne I acted in obedience to the dictate


of my conviction; my action was not the result of any outside
advice or pressure.
During the past ten years I have had an intention to cause
the Crown Prince to conduct the affairs of State, but, no
opportunity presenting itself, my intention has to this day
remained unrealized. Believing, however, that such
opportunity has now arrived, I have abdicated in favor of the
Crown Prince. In taking this step I have followed a natural
order of things, and its consummation is a matter of
congratulation for the sake of my dynasty and country. Yet I
am grieved to have to observe that some of my ignorant
subjects, laboring under a mistaken conception of my motives
and in access of wanton indignation, may be betrayed into
acts of violence. In reliance, therefore, upon the Resident-
General, I entrust him with the power of preventing or
suppressing such acts of violence.

This appeal to the Residency-General to preserve order in Seoul


was made in view of events which had occurred earlier in the
afternoon of the same day. About a quarter to four a Japanese
military officer on horseback was stopped by the mob while passing
in front of the main gate of the Palace; and when the Japanese
policemen in the Korean service came to his rescue and attempted
to open a path for him through the crowd, both they and the officer
were more or less seriously wounded by stones. The mob, on being
dispersed, retreated in the neighborhood of Chong-no. Here a party
of Korean soldiers, who had deserted from the barracks since the
previous night, joined the crowds under the command of an officer.
Soon after five o’clock these soldiers, without either provocation or
warning, fired a succession of volleys upon a party of police officers,
killing and wounding more than a score; whereupon the fury of the
mob broke out anew, and several more were killed and wounded on
both sides. The total number of police officers who lost their lives in
this way was ten, and some thirty or more others were more or less
severely wounded.[104] After this dastardly action the Korean
soldiers ran away.
As to the unprovoked character of this deplorable incident the
testimony of eye-witnesses is quite conclusive. Dr. George Heber
Jones, who was on the spot soon after the first sound of firing, says:
“In fact all through the excitement I was impressed with the
moderation and self-control shown by the public officers in dealing
with the crowds which had been surging about them since Thursday
night. Their conduct was admirable.” After narrating the experiences
of himself and his companion as they came upon the dead and
wounded lying in the streets and alleys of the district, the wrecked
police-boxes and the officers covered with blood, this witness goes
on to say: “The Pyeng-yang soldiers in the barracks just north of
Chong-no, becoming restive, in the afternoon broke into the
magazine of their barracks and supplied themselves with
ammunition. One company of them then broke out, and under
command—it is said, of a captain who was mounted—suddenly
appeared at Chong-no and without warning began firing on the
policemen who were trying to preserve order in the crowds.... A
mania of destruction took possession of the people for a time, and
there are reports of assaults on Japanese civilians in various parts of
the city; and from what I personally witnessed there is little doubt of
this, that the scenes of violence which occurred in 1884 were
repeated yesterday.”[105]
As a result of the Emperor’s request following upon this outbreak
of serious disorder, the city of Seoul was put in charge of Japanese
police and gendarmes. A strong body of Japanese troops was posted
outside the Palace, and four machine guns were placed in front of
the Taihan or Main Gate. A battalion of infantry was summoned from
Pyeng-yang, and a squadron of the artillery regiment at Yong-san.
The riotous outbreaks were now mainly directed against those
Korean officials who had brought about the abdication of the
Emperor. Over one thousand rioters assembled near the Kwang-song
Gate and, after a short debate, proceeded to assault and set on fire
the residence of the Prime Minister, Mr. Yi Wan-yong. In spite of the
efforts of the Japanese troops and gendarmes, as well as of the fire
brigades, a large portion of the residence was destroyed. Part of a
Korean battalion also assaulted the prison at Chong-no, where the
headquarters of the Japanese police had been established, but were
driven away. At 6 p. m. of Tuesday, July 23d, a huge crowd
assembled and “passed resolutions” that at sunset the headquarters
of the Il Chin-hoi, or party most prominent in its demand for
reforms, should be set on fire, and after this several other buildings
were marked for destruction. These attempts were, however,
frustrated; but the villas of Mr. Yi Kun-tak and Mr. Yi Chi-yung, the
former Ministers of War and of Home Affairs, outside the small East
Gate, were burned. Finally, these demonstrations of rowdyism came
to a point of cessation, and the usual order of Seoul was restored.
During the period of rioting the Korean crowd was, as usual,
tolerably impartial in the distribution of its favors; in addition to
Japanese and Koreans, a few Chinese and other foreigners were
assaulted or shot at.
All these events made it entirely obvious, even to the most
prejudiced observer, that the Korean Government was still as
incapable of securing and preserving order in times of popular
excitement as it has ever been. It could not guarantee the safety of
its own officials or of foreigners of any nationality, without outside
assistance. Unless the controlling influence of the Japanese
authorities had been exercised, there cannot be the slightest doubt
that a frightful reign of anarchy and bloodshed would have ensued
upon the abdication of the Emperor; and no one acquainted with the
Korean mob, when once let loose, will venture to predict how many,
and whom, it might have involved. Thus far these authorities had
done nothing beyond lending an indispensable support and
assistance to the Korean Government. They were acting wholly in its
interests as centralized in the newly declared Emperor and in the
Cabinet Ministers. One other thing, however, was also made equally
obvious. The Korean army could not be trusted; its continuance as at
present constituted was an intolerable menace to both governments,
as well as to the interests of the people at large. It was intrinsically
worthless for the legitimate purposes of an army, and dangerous in
the extreme as a force to provoke and to intensify all manner of
lawlessness. If it had not been for the mutinous action of these
undisciplined troops, who became centres of all the forces of
sedition, arson, and murder, there would probably have been little or
no bloodshed connected with the events of July, 1907.
It should not be forgotten that the Korean Ministers were
influenced by patriotic motives in unanimously and urgently
demanding the abdication of the Emperor.[106] It immediately
became evident, however, that His Majesty did not intend really to
abdicate, but that he was continuing his old tricks of intrigue,
double-dealing, and instigating assassination. There was well-
founded suspicion—to quote a statement based on trustworthy
information—that “the unfortunate incident of Friday last and the
mutinous spirit prevailing among the Korean troops were the result
of an understanding between the ex-Emperor and his abettors and
supporters in Seoul.” There was even proof of a conspiracy to have
the Korean troops rise in a body, kill the entire Korean Cabinet, and
rescue from their dominating influence his “oppressed” Majesty.
Whatever may be the full measure of truth as to these and other
secret intrigues and plots for sedition and murder, certain actions
were publicly avowed that were unmistakably in open defiance of
the new Emperor and his Ministers, as well as complete proof that
by abdication His Majesty meant something quite different from
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!

ebookluna.com

You might also like