0% found this document useful (0 votes)
53 views

Data Structures and Other Objects Using C++ 2nd edition by Michael Main ISBN 8129705826 978-8129705822 - The full ebook version is just one click away

The document provides links to download various textbooks and ebooks related to data structures and programming, particularly using C and C++. It highlights several editions of books by authors such as Michael Main and Walter Savitch, focusing on topics like data types, algorithms, and object-oriented programming. Additionally, it outlines the structure and educational approach of a course designed to teach these concepts effectively to students.

Uploaded by

trushobeddis
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
0% found this document useful (0 votes)
53 views

Data Structures and Other Objects Using C++ 2nd edition by Michael Main ISBN 8129705826 978-8129705822 - The full ebook version is just one click away

The document provides links to download various textbooks and ebooks related to data structures and programming, particularly using C and C++. It highlights several editions of books by authors such as Michael Main and Walter Savitch, focusing on topics like data types, algorithms, and object-oriented programming. Additionally, it outlines the structure and educational approach of a course designed to teach these concepts effectively to students.

Uploaded by

trushobeddis
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/ 48

Download the full version and explore a variety of ebooks

or text books at https://ebookball.com

Data Structures and Other Objects Using C++ 2nd


edition by Michael Main ISBN 8129705826
978-8129705822

_____ Follow the link below to get your download now _____

https://ebookball.com/product/data-structures-and-other-
objects-using-c-2nd-edition-by-michael-main-
isbn-8129705826-978-8129705822-16344/

Access ebookball.com now to download high-quality


ebooks or textbooks
We believe these products will be a great fit for you. Click
the link to download now, or visit ebookball.com
to discover even more!

Data Structures And Other Objects Using C 4th Edition by


Michael Main, Walter Savitch 0132129485 9780132129480

https://ebookball.com/product/data-structures-and-other-objects-
using-c-4th-edition-by-michael-main-walter-
savitch-0132129485-9780132129480-17178/

Data Structures Using C 2nd Edition by Malik 0324782012


978-0324782011

https://ebookball.com/product/data-structures-using-c-2nd-edition-by-
malik-0324782012-978-0324782011-17222/

Data Structures and Problem Solving Using C++ 2nd edition


by MALIK ISBN 0324782012 978-0324782011

https://ebookball.com/product/data-structures-and-problem-solving-
using-c-2nd-edition-by-malik-isbn-0324782012-978-0324782011-16350/

Paediatric Radiology Rapid Reporting for FRCR Part 2B 1st


edition by Michael Paddock,Amaka Offiah 3030019659
9783030019655
https://ebookball.com/product/paediatric-radiology-rapid-reporting-
for-frcr-part-2b-1st-edition-by-michael-paddock-amaka-
offiah-3030019659-9783030019655-6052/
Principles of Data Structures Using C and C 1st Edition by
Vinu Das ISBN 8122418589 9788122418583

https://ebookball.com/product/principles-of-data-structures-using-c-
and-c-1st-edition-by-vinu-das-isbn-8122418589-9788122418583-15766/

Data Structures Algorithms and Applications in C++ With


Microsoft Compiler 2nd edition by Michael Goodrich,
Roberto Tamassia, David Mount ISBN B005FHM6X2
978-0470383278
https://ebookball.com/product/data-structures-algorithms-and-
applications-in-c-with-microsoft-compiler-2nd-edition-by-michael-
goodrich-roberto-tamassia-david-mount-
isbn-b005fhm6x2-978-0470383278-16544/

Problem Solving in Data Structures and Algorithms Using C


1st Edition by Hemant Jain ISBN 9352655915 9789352655915

https://ebookball.com/product/problem-solving-in-data-structures-and-
algorithms-using-c-1st-edition-by-hemant-jain-
isbn-9352655915-9789352655915-15768/

Problem Solving in Data Structures and Algorithms Using C


1st Edition by Hemant Jain ISBN 1540407306 9781540407306

https://ebookball.com/product/problem-solving-in-data-structures-and-
algorithms-using-c-1st-edition-by-hemant-jain-
isbn-1540407306-9781540407306-15866/

Data Structures Abstraction and Design Using Java 2nd


Edition by Elliot Koffman, Paul Wolfgang 0470128704
978-0470128701
https://ebookball.com/product/data-structures-abstraction-and-design-
using-java-2nd-edition-by-elliot-koffman-paul-
wolfgang-0470128704-978-0470128701-17228/
Preface i

DATA
STRUCTURES
&
OTHER
OBJECTS
Using C++ 4TH
EDITION

MICHAEL MAIN
Department of Computer Science
University of Colorado at Boulder

WALTER SAVITCH
Department of Computer Science
and Engineering
University of California, San Diego

Addison-Wesley

Boston Columbus Indianapolis New York San Francisco Upper Saddle River
Amsterdam Cape Town Dubai London Madrid Milan Munich Paris Montreal Toronto

Delhi Mexico City Sao Paulo Sydney Hong Kong Seoul Singapore Taipei Tokyo
ii Preface
Editor-in-Chief: Michael Hirsch Marketing Manager: Erin Davis
Editorial Assistant: Stephanie Sellinger Marketing Coordinator: Kathryn Ferranti
Managing Editor: Jeffrey Holcomb Art Director: Linda Knowles
Production Project Manager: Heather McNally Cover Designer: Elena Sidorova
Copy Editor: Sada Preisch Cover Artwork: © 2010 Stocksearch / Alamy
Proofreader: Genevieve d’Entremont Senior Manufacturing Buyer: Carol Melville

Access the latest information about all Pearson Addison-Wesley Computer Science titles from our World
Wide Web site: http://www.pearsonhighered.com/cs

The programs and applications presented in this book have been included for their instructional value. They
have been tested with care, but are not guaranteed for any particular purpose. The publisher does not offer any
warranties or representations, nor does it accept any liabilities with respect to the programs or applications.

Credits and acknowledgments borrowed from other sources and reproduced, with permission, in this textbook
appear on appropriate page within text.

UNIX® is a registered trademark in the United States and other countries, licensed exclusively through X-Open
Company, Ltd. Pez® is a registered trademark of Pez Candy, Inc.

Copyright © 2011, 2005, 2001, 1997 Pearson Education, Inc., publishing as Addison-Wesley, 501 Boylston
Street, Suite 900, Boston MA 02116. All rights reserved. Manufactured in the United States of America. This
publication is protected by Copyright, and permission should be obtained from the publisher prior to any
prohibited reproduction, storage in a retrieval system, or transmission in any form or by any means, electronic,
mechanical, photocopying, recording, or likewise. To obtain permission(s) to use material from this work,
please submit a written request to Pearson Education, Inc., Permissions Department, , 501 Boylston Street,
Suite 900, Boston MA 02116.

Many of the designations by manufacturers and seller to distinguish their products are claimed as trademarks.
Where those designations appear in this book, and the publisher was aware of a trademark claim, the
designations have been printed in initial caps or all caps.

Library of Congress Cataloging-in-Publication Data


Main, M. (Michael), 1956–
Data structures and other objects using C++ / Michael Main, Walter Savitch.-- 4th ed.
p. cm.
Includes index.
ISBN 978-0-13-212948-0 (pbk.)
1. C++ (Computer program language) 2. Data structures (Computer science) 3. Object-oriented
programming (Computer science) I. Savitch, Walter J., 1943– II. Title.

QA76.73.C153M25 2010
005.13’3—dc22
2009049328
CIP
1 2 3 4 5 6 7 8 9 10--CRS--14 13 12 11 10

ISBN 10: 0-13-212948-5


ISBN 13: 978-0-13-212948-0
Preface iii

Preface

T his book is written for a second course in computer science,


the CS 2 course at many universities. The text’s emphasis is on the
specification, design, implementation, and use of the basic data types that
normally are covered in a second-semester course. In addition, we cover a
range of important programming techniques and provide self-contained cov-
erage of abstraction techniques, object-oriented programming, big-O time
analysis of algorithms, and sorting.
We assume that the student has already had an introductory computer sci-
ence and programming class, but we do include coverage of those topics (such
as recursion and pointers) that are not always covered completely in a first
course. The text uses C++, but our coverage of C++ classes begins from
scratch, so the text may be used by students whose introduction to program-
ming was in C rather than C++. In our experience, such students need a brief
coverage of C++ input and output techniques (such as those provided in Appen-
dix F) and some coverage of C++ parameter types (which we provide in Chap-
ter 2). When C programmers are over the input/output hurdle and the parameter
hurdle (and perhaps a small “fear” hurdle), they can step readily into classes
and other object-oriented features of C++. As this indicates, there are several
pathways through the text that can be tailored to different backgrounds, includ-
ing some optional features for the student who comes to the class with a stron-
ger than usual background.

New to This Edition


The C++ Standard Template Library (STL) plays a larger role in our curricu-
lum than past editions, and we have added selected new material to support
this. For us, it’s important that our students understand both how to use the
STL classes in an application program and the possible approaches to imple- iii
iv Preface

menting these (or similar) classes. With this in mind, the primary changes that
you’ll find for this edition are:
• A new Section 2.6 that gives an early introduction to the Standard Tem-
plate Library using the pair class. We have been able to introduce students
to the STL here even before they have a full understanding of templates.
• An earlier introduction of the multiset class and STL iterators in Section
3.4. This is a good location for the material because the students have just
seen how to implement their first collection class (the bag), which is
based on the multiset.
• We continue to introduce the STL string class in Section 4.5, where it’s
appropriate for the students to implement their own string class with a
dynamic array.
• A new Section 5.6 that compares three similar STL classes: the vector, the
list, and the deque. At this point, the students have enough knowledge to
understand typical vector and list implementations.
• A first introduction to the STL algorithms appears in Section 6.3, and this
is now expanded on in Sections 11.2 (the heap algorithms) and 13.4
(expanded coverage of sorting and binary search in the STL).
• A new Section 8.4 provides typical implementation details for the STL
deque class using an interesting combination of dynamic arrays and point-
ers.
• A discussion of hash tables in the proposed TR1 expansions for the STL
is now given in Section 12.6.

Most chapters also include new programming projects, and you may also keep
an eye on our project web site, www.cs.colorado.edu/~main/dsoc.html, for new
projects as we develop them.

The Steps for Each Data Type


Overall, the fourth edition remains committed to the data types: sets, bags (or
multisets), sequential lists, ordered lists (with ordering from a “less than” opera-
tor), stacks, queues, tables, and graphs. There are also additional supplemental
data types such as a priority queue. Each of these data types is introduced fol-
lowing a consistent pattern:

Step 1: Understand the data type abstractly. At this level, a student gains an
understanding of the data type and its operations at the level of concepts and
pictures. For example, a student can visualize a stack and its operations of push-
ing and popping elements. Simple applications are understood and can be car-
ried out by hand, such as using a stack to reverse the order of letters in a word.

Step 2: Write a specification of the data type as a C++ class. In this step,
the student sees and learns how to write a specification for a C++ class that can
Preface v

implement the data type. The specification includes prototypes for the construc-
tors, public member functions, and sometimes other public features (such as an
underlying constant that determines the maximum size of a stack). The prototype
of each member function is presented along with a precondition/postcondition
contract that completely specifies the behavior of the function. At this level, it’s
important for the students to realize that the specification is not tied to any par-
ticular choice of implementation techniques. In fact, this same specification may
be used several times for several different implementations of the same data type.

Step 3: Use the data type. With the specification in place, students can write
small applications or demonstration programs to show the data type in use.
These applications are based solely on the data type’s specification, as we still
have not tied down the implementation.

Step 4: Select appropriate data structures, and proceed to design and


implement the data type. With a good abstract understanding of the data
type, we can select an appropriate data structure, such as a fixed-sized array, a
dynamic array, a linked list of nodes, or a binary tree of nodes. For many of our
data types, a first design and implementation will select a simple approach, such
as a fixed-sized array. Later, we will redesign and reimplement the same data
type with a more complicated underlying structure.
Since we are using C++ classes, an implementation of a data type will have
the selected data structures (arrays, pointers, etc.) as private member variables of
the class. With each implemented class, we stress the necessity for a clear under-
standing of the rules that relate the private member variables to an abstract notion
of the data type. We require each student to write these rules in clear English sen-
tences that we call the invariant of the abstract data type. Once the invariant is
written, students can proceed to implementing various member functions. The
invariant helps in writing correct functions because of two facts: (a) Each func-
tion (except constructors) knows that the invariant is true when the function
begins its work; and (b) each function (except the destructor) is responsible for
ensuring that the invariant is again true when the function finishes.
Step 5: Analyze the implementation. Each implementation can be analyzed
for correctness, flexibility (such as a fixed size versus dynamic size), and time
analysis of the operations (using big-O notation). Students have a particularly
strong opportunity for these analyses when the same data type has been imple-
mented in several different ways.

Where Will the Students Be at the End of the Course?


At the end of our course, students understand the data types inside out. They
know how to use the data types, they know how to implement them several
ways, and they know the practical effects of the different implementation
choices. The students can reason about efficiency with a big-O analysis and
vi Preface

argue for the correctness of their implementations by referring to the invariant


of the class.
One of the important lasting effects of the course is the specification, design,
and implementation experience. The improved ability to reason about programs
is also important. But perhaps most important of all is the exposure to classes that
are easily used in many situations. The students no longer have to write every-
thing from scratch. We tell our students that someday they will be thinking about
a problem, and they will suddenly realize that a large chunk of the work can be
done with a bag, or a stack, or a queue, or some such. And this large chunk of
work is work that they won’t have to do. Instead, they will pull out the bag or
stack or queue or some such that they wrote this semester—using it with no mod-
ifications. Or, more likely, they will use the familiar data type from a library of
standard data types, such as the C++ Standard Template Library. In fact, the
behavior of the data types in this text is a cut-down version of the Standard Tem-
plate Library, so when students take the step to the real STL, they will be on
familiar ground. And at that point of realization, knowing that a certain data type
is the exact solution he or she needs, the student becomes a real programmer.

Other Foundational Topics


Throughout the course, we also lay a foundation for other aspects of “real pro-
gramming,” with coverage of the following topics beyond the basic data struc-
tures material:

Object-oriented programming. The foundations of object-oriented program-


ming (OOP) are laid by giving students a strong understanding of C++ classes.
The important aspects of classes are covered early: the notion of a member
function, the separation into private and public members, the purpose of con-
structors, and a small exposure to operator overloading. This is enough to get
students going and excited about classes.
Further major aspects of classes are introduced when the students first use
dynamic memory (Chapter 4). At this point, the need for three additional items
is explained: the copy constructor, the overloaded assignment operator, and the
destructor. Teaching these OOP aspects with the first use of dynamic memory
has the effect of giving the students a concrete picture of dynamic memory as a
resource that can be taken and must later be returned.
Conceptually, the largest innovation of OOP is the software reuse that occurs
via inheritance. And there are certainly opportunities for introducing inheritance
right from the start of a data structures course (such as implementing a set class
as a descendant of a bag class). However, an early introduction may also result
in juggling too many new concepts at once, resulting in a weaker understanding
of the fundamental data structures. Therefore, in our own course we introduce
inheritance at the end as a vision of things to come. But the introduction to inher-
itance (Sections 14.1 and 14.2) could be covered as soon as copy constructors are
Preface vii

understood. With this in mind, some instructors may wish to cover Chapter 14
earlier, just before stacks and queues.
Another alternative is to identify students who already know the basics of
classes. These students can carry out an inheritance project (such as the ecosys-
tem of Section 14.2 or the game engine in Section 14.3) while the rest of the stu-
dents first learn about classes.

Templates. Template functions and template classes are an important part of


the proposed Standard Template Library, allowing a programmer to easily
change the type of the underlying item in a container class. Template classes
also allow the use of several different instantiations of a class in a single pro-
gram. As such, we think it’s important to learn about and use templates (Chapter
6) prior to stacks (Chapter 7), since expression evaluation is an important appli-
cation that uses two kinds of stacks.

Iterators. Iterators are another important part of the proposed Standard Tem-
plate Library, allowing a programmer to easily step through the items in a con-
tainer object (such as the elements of a set or bag). Such iterators may be
internal (implemented with member functions of the container class) or external
(implemented by a separate class that is a friend of the container class). We
introduce internal iterators with one of the first container classes (a sequential
list in Section 3.2). An internal iterator is added to the bag class when it is
needed in Chapter 6. At that point, the more complex external iterators also are
discussed, and students should be aware of the advantages of an external itera-
tor. Throughout the text, iterators provide a good opportunity for programming
projects, such as implementing an external bag iterator (Chapter 6) or using a
stack to implement an internal iterator of a binary search tree (Chapter 10).

Recursion. First-semester courses sometimes introduce students to recursion.


But many of the first-semester examples are tail recursion, where the final act of
the function is the recursive call. This may have given students a misleading
impression that recursion is nothing more than a loop. Because of this, we prefer
to avoid early use of tail recursion in a second-semester course. For example,
list traversal and other operations on linked lists can be implemented with tail
recursion, but the effect may reinforce wrong impressions about recursion (and
the tail recursive list operations may need to be unlearned when the students
work with lists of thousands of items, running into potential run-time stack
overflow).
So, in our second-semester course, we emphasize recursive solutions that use
more than tail recursion. The recursion chapter provides three examples along
these lines. Two of the examples—generating random fractals and traversing a
maze—are big hits with the students. In our class, we teach recursion (Chapter
9) just before trees (Chapter 10), since it is in recursive tree algorithms that recur-
sion becomes vital. However, instructors who desire more emphasis on recursion
can move that topic forward, even before Chapter 2.
viii Preface

In a course that has time for advanced tree projects (Chapter 11), we analyze
the recursive tree algorithms, explaining the importance of keeping the trees
balanced—both to improve worst-case performance, and to avoid potential run-
time stack overflow.

Searching and sorting. Chapters 12 and 13 provide fundamental coverage of


searching and sorting algorithms. The searching chapter reviews binary search
of an ordered array, which many students will have seen before. Hash tables
also are introduced in the search chapter. The sorting chapter reviews simple
quadratic sorting methods, but the majority of the chapter focuses on faster
algorithms: the recursive merge sort (with worst-case time of O(n log n)), Tony
Hoare’s recursive quicksort (with average-time O(n log n)), and the tree-based
heap sort (with worst-case time of O(n log n)). There is also a new introduction
to the C++ Standard Library sorting functions.

Advanced Projects
The text offers good opportunities for optional projects that can be undertaken
by a more advanced class or by students with a stronger background in a large
class. Particular advanced projects include the following:
• A polynomial class using dynamic memory (Section 4.6).
• An introduction to Standard Library iterators, culminating in an imple-
mentation of an iterator for the student’s bag class (Sections 6.3 through
6.5).
• An iterator for the binary search tree (Programming Projects in Chapter
10).
• A priority queue, implemented with a linked list (Chapter 8 projects), or
implemented using a heap (Section 11.1).
• A set class, implemented with B-trees (Section 11.3). We have made a
particular effort on this project to provide information that is sufficient for
students to implement the class without need of another text. In our
courses, we have successfully directed advanced students to do this
project as independent work.
• An inheritance project, such as the ecosystem of Section 14.2.
• An inheritance project using an abstract base class such as the game base
class in Section 14.3 (which allows easy implementation of two-player
games such as Othello or Connect Four).
• A graph class and associated graph algorithms from Chapter 15. This is
another case where advanced students may do work on their own.
Preface ix

C++ Language Features


C++ is a complex language with many advanced features that will not be
touched in a second-semester course. But we endeavor to provide complete
coverage for those features that we do touch. In the first edition of the text, we
included coverage of two features that were new to C++ at the time: the new
bool data type (Figure 2.1 on page 37) and static member constants (see
page 104). The requirements for using static member constants were changed in
the 1998 Standard, and we have incorporated this change into the text (the
constant must now be declared both inside and outside the class definition). The
other primary new feature from the 1998 Standard is the use of namespaces,
which were incorporated in the second edition. In each of these cases, these
features might not be supported in older compilers. We provide some assistance
in dealing with this (see Appendix E, “Dealing with Older Compilers”), and
some assistance in downloading and installing the GNU g++ compiler (see
Appendix K).

Flexibility of Topic Ordering


This book was written to allow instructors latitude in reordering the material to
meet the specific background of students or to add early emphasis to selected
topics. The dependencies among the chapters are shown on page xi. A line join-
ing two boxes indicates that the upper box should be covered before the lower
box.
Here are some suggested orderings of the material:

Typical course. Start with Chapters 1–10, skipping parts of Chapter 2 if the
students have a prior background in C++ classes. Most chapters can be covered
in a week, but you may want more time for Chapter 5 (linked lists), Chapter 6
(templates), Chapter 9 (recursion), or Chapter 10 (trees). Typically, we cover the
material in 13 weeks, including time for exams and extra time for linked lists
and trees. Remaining weeks can be spent on a tree project from Chapter 11, or
on binary search (Section 12.1) and sorting (Chapter 13).

Heavy OOP emphasis. If students cover sorting and searching elsewhere,


there will be time for a heavier emphasis on object-oriented programming. The
first four chapters are covered in detail, and then derived classes (Section 14.1)
are introduced. At this point, students can do an interesting OOP project, based
on the ecosystem of Section 14.2 or the games in Section 14.3. The basic data
structures are then covered (Chapters 5–8), with the queue implemented as a
derived class (Section 14.3). Finish up with recursion (Chapter 9) and trees
(Chapter 10), placing special emphasis on recursive member functions.

Accelerated course. Assign the first three chapters as independent reading in


the first week, and start with Chapter 4 (pointers). This will leave two to three
x Preface

extra weeks at the end of the term, so that students may spend more time on
searching, sorting, and the advanced topics (shaded on page xi.)
We also have taught the course with further acceleration by spending no lec-
ture time on stacks and queues (but assigning those chapters as reading).

Early recursion / early sorting. One to three weeks may be spent at the start
of class on recursive thinking. The first reading will then be Chapters 1 and 9,
perhaps supplemented by additional recursive projects.
If recursion is covered early, you may also proceed to cover binary search
(Section 12.1) and most of the sorting algorithms (Chapter 13) before introduc-
ing C++ classes.

Supplements via the Internet


The following supplemental materials for this text are available to all readers at
www.aw-bc.com/cssupport:
• Source code. All the C++ classes, functions, and programs that appear in
the book are available to readers.
• Errata. We have tried not to make mistakes, but sometimes they are
inevitable. A list of detected errors is available and updated as necessary.
You are invited to contribute any errors you find.

In addition, the following supplements are available to qualified instructors at


www.pearsonhighered.com/irc. Please contact your Addison-Wesley sales rep-
resentative, or send email to [email protected], for information on how to
access them:
• PowerPoint lecture slides
• Exam questions
• Solutions to selected programming projects
• Sample assignments and lab exercises
• Suggested syllabi
Preface xi

Chapter Dependencies

At the start of the course, students should be comfortable writing functions and using
arrays in C++ or C. Those who have used only C should read Appendix F and pay
particular attention to the discussion of reference parameters in Section 2.4.

Chapter 1
Introduction

Chapters 2, 3, and 4.1–4.4


Classes
Container Classes
Pointers and Dynamic Memory Chapter 9
Recursion
Chapter 2 may be skipped by students
with a good background in C++ classes.

Chapter 5 Section 12.1


Linked Lists Binary Search
Sections 4.5–4.6
Projects:
String Class Sections 6.1–6.2
Templates Sec. 12.2–12.3
Polynomial Hash Tables
(Also requires
6.1–6.2)
Chapter 7
Sections 6.3–6.6 Stacks
More Templates
and Iterators Chapter 13
Sorting
Chapter 8 Chapter 10 (Heapsort also
Queues Trees needs Sec. 11.1)
Sections 14.1–14.2
Derived Classes
Section 11.1-2 Section 11.3 Chapter 15
Heaps B-Trees Graphs

Section 14.3
Virtual Methods Section 11.4
Detailed Tree Analysis
The shaded boxes provide
good opportunities for
advanced work.
xii Preface

Acknowledgments
We started this book while Walter was visiting Michael at the Computer Science
Department of the University of Colorado in Boulder. The work was completed
after Walter moved back to the Department of Engineering and Computer Sci-
ence at the University of California, San Diego. We are grateful to these institu-
tions for providing facilities, wonderful students, and interaction with congenial
colleagues.
Our students have been particularly helpful—nearly 5000 of our students
worked through the material, making suggestions, showing us how they learned.
We thank the reviewers and instructors who used the material in their data struc-
tures courses and provided feedback: Zachary Bergen, Cathy Bishop, Martin
Burtscher, Gina Cherry, Courtney Comstock, Stephen Davies, Robert Frohardt,
John Gillett, Mike Hendricks, Ralph Hollingsworth, Yingdan Huang, Patrick
Lynn, Ron McCarty, Shivakant Mishra, Evi Nemeth, Rick Osborne, Rachelle
Reese, and Nicholas Tran. The book was also extensively reviewed by Wolfgang
W. Bein, Bill Hankley, Michael Milligan, Paul Nagin, Jeff Parker, Andrew L.
Wright, John R. Rose, and Evan Zweifel. We thank these colleagues for their
excellent critique and their encouragement.
Thank you to Lesley McDowell and Chris Schenk, who are pleasant and
enthusiastic every day in the computer science department at the University of
Colorado. Our thanks also go to the editors and staff at Addison-Wesley. Heather
McNally’s work has encouraged us and provided us with smooth interaction on
a daily basis and eased every step of the production. Karin Dejamaer and Jessica
Hector provided friendly encouragement in Boulder, and we offer our thanks to
them. We welcome and appreciate Michael Hirsch in the role of editor, where he
has shown amazing energy, enthusiasm, and encouragement. Finally, our origi-
nal editor, Susan Hartman, has provided continual support, encouragement, and
direction—the book wouldn’t be here without you!
In addition to the work and support from those who put the book together, we
thank those who offered us daily interest and encouragement. Our deepest thanks
go to Holly Arnold, Vanessa Crittenden, Meredith Boyles, Suzanne Church, Erika
Civils, Lynne Conklin, Andrzej Ehrenfeucht, Paul Eisenbrey, Skip Ellis, John
Kennedy, Rick Lowell, George Main, Mickey Main, Jesse Nuzzi, Ben Powell,
Marga Powell, Megan Powell, Grzegorz Rozenberg, Hannah, Timothy, and
Janet.

Michael Main Walter Savitch


[email protected] [email protected]
Boulder, Colorado San Diego, California
Contents xv

Contents

CHAPTER 1 THE PHASES OF SOFTWARE DEVELOPMENT


1.1 Specification, Design, Implementation 3
Design Concept: Decomposing the Problem 4
Preconditions and Postconditions 6
Using Functions Provided by Other Programmers 8
Implementation Issues for the ANSI/ISO C++ Standard 8
C++ Feature: The Standard Library and the Standard Namespace 9
Programming Tip: Use Declared Constants 11
Clarifying the Const Keyword
Part 1: Declared Constants 12
Programming Tip: Use Assert to Check a Precondition 12
Programming Tip: Use EXIT_SUCCESS in a Main Program 14
C++ Feature: Exception Handling 14
Self-Test Exercises for Section 1.1 14
1.2 Running Time Analysis 15
The Stair-Counting Problem 15
Big-O Notation 21
Time Analysis of C++ Functions 23
Worst-Case, Average-Case, and Best-Case Analyses 25
Self-Test Exercises for Section 1.2 25
1.3 Testing and Debugging 26
Choosing Test Data 26
Boundary Values 27
Fully Exercising Code 28
Debugging 28
Programming Tip: How to Debug 28
Self-Test Exercises for Section 1.3 29
Chapter Summary 30
Solutions to Self-Test Exercises 31

CHAPTER 2 ABSTRACT DATA TYPES AND C++ CLASSES


2.1 Classes and Members 34
Programming Example: The Throttle Class 34
Clarifying the Const Keyword
Part 2: Constant Member Functions 38
Using a Class 39
A Small Demonstration Program for the Throttle Class 40
Implementing Member Functions 42
Member Functions May Activate Other Members 44
Programming Tip: Style for Boolean Variables 44
Self-Test Exercises for Section 2.1 45
xvi Contents

2.2 Constructors 45
The Throttle’s Constructor 46
What Happens If You Write a Class with No Constructors? 49
Programming Tip: Always Provide Constructors 49
Revising the Throttle’s Member Functions 49
Inline Member Functions 49
Programming Tip: When to Use an Inline Member Function 50
Self-Test Exercises for Section 2.2 51
2.3 Using a Namespace, Header File, and Implementation File 51
Creating a Namespace 51
The Header File 52
Describing the Value Semantics of a Class Within the Header File 56
Programming Tip: Document the Value Semantics 57
The Implementation File 57
Using the Items in a Namespace 59
Pitfall: Never Put a Using Statement Actually in a Header File 60
Self-Test Exercises for Section 2.3 62
2.4 Classes and Parameters 63
Programming Example: The Point Class 63
Default Arguments 65
Programming Tip: A Default Constructor Can Be Provided by Using Default
Arguments 66
Parameters 67
Pitfall: Using a Wrong Argument Type for a Reference Parameter 70
Clarifying the Const Keyword
Part 3: Const Reference Parameters 72
Programming Tip: Use const Consistently 73
When the Type of a Function’s Return Value Is a Class 73
Self-Test Exercises for Section 2.4 74
2.5 Operator Overloading 74
Overloading Binary Comparison Operators 75
Overloading Binary Arithmetic Operators 76
Overloading Output and Input Operators 77
Friend Functions 80
Programming Tip: When to Use a Friend Function 81
The Point Class—Putting Things Together 82
Summary of Operator Overloading 85
Self-Test Exercises for Section 2.5 85
2.6 The Standard Template Libary and the Pair Class 86
Chapter Summary 87
Solutions to Self-Test Exercises 88
Programming Projects 90
Contents xvii

CHAPTER 3 CONTAINER CLASSES


3.1 The Bag Class 97
The Bag Class—Specification 98
C++ Feature: Typedef Statements Within a Class Definition 99
C++ Feature: The std::size_t Data Type 100
Clarifying the Const Keyword
Part 4: Static Member Constants 104
Older Compilers Do Not Support Initialization of Static Member Constants 105
The Bag Class—Documentation 105
Documenting the Value Semantics 107
The Bag Class—Demonstration Program 107
The Bag Class—Design 109
Pitfall: The value_type Must Have a Default Constructor 110
The Invariant of a Class 110
The Bag Class—Implementation 111
Pitfall: Needing to Use the Full Type Name bag::size_type 112
Programming Tip: Make Assertions Meaningful 112
C++ Feature: The Copy Function from the C++ Standard Library 116
The Bag Class—Putting the Pieces Together 117
Programming Tip: Document the Class Invariant in the Implementation File 117
The Bag Class—Testing 121
Pitfall: An Object Can Be an Argument to Its Own Member Function 121
The Bag Class—Analysis 122
Self-Test Exercises for Section 3.1 123
3.2 Programming Project: The Sequence Class 124
The Sequence Class—Specification 124
The Sequence Class—Documentation 127
The Sequence Class—Design 127
The Sequence Class—Pseudocode for the Implementation 130
Self-Test Exercises for Section 3.2 132
3.3 Interactive Test Programs 133
C++ Feature: Converting Input to Uppercase Letters 134
C++ Feature: The Switch Statement 138
Self-Test Exercises for Section 3.3 138
3.4 The STL Multiset Class and Its Iterator 139
The Multiset Template Class 139
Some Multiset Members 140
Iterators and the [...) Pattern 140
Pitfall: Do Not Access an Iterator’s Item After Reaching end( ) 142
Testing Iterators for Equality 143
Other Multiset Operations 143
Invalid Iterators 144
Clarifying the Const Keyword
Part 5: Const Iterators 144
Pitfall: Changing a Container Object Can Invalidate Its Iterators 144
Self-Test Exercises for Section 3.4 145
Chapter Summary 146
Solutions to Self-Test Exercises 146
Programming Projects 149
Other documents randomly have
different content
CHAPTER XXXVII
CAPE HORN

It was on one of the closing days of the month of December that


my longitude being then some three leagues east of the easternmost
of the Falkland Islands, and my latitude some fifty-five degrees
south, that I brought the barque’s head to a west-south-west course
for the rounding of Cape Horn. It was happily the summer season in
those parts—their midsummer, indeed—and I was glad to believe
that the horrors of this passage would be mitigated by a sun that in
the month of June shines for scarcely six hours in the day over the
ice-laden surge of this, the most inhospitable, the most bitterly
dreary tract of waters upon the face of the world.
Down to the latitude of the Falkland Islands we had sighted, from
the hour of my taking command of the barque, but four sail, so vast
is the ocean, and so minute a speck does a ship make upon it. But
whilst the loom of the land about Berkeley Sound was hanging in a
blue and windy shadow, with a gleam as of snow upon it away out
upon our starboard beam, we fell in with a whaler, a vessel rigged as
ours was; a round-bowed, motherly old craft, jogging along under a
load of boats suspended over her sides from the extremities of thick
wooden davits. There was a long Atlantic swell running, and as she
rose and rolled to it, she showed a line of green sheathing dark with
moss and barnacles and lines of trailing weeds.
She had been visible at daybreak right ahead, and she was clear
upon the sea over our bow, when I came on deck shortly after eight
bells to relieve Lush, who had had the watch since four o’clock.
‘What have we there?’ said I, bringing Braine’s old leather
telescope out of the companion and putting my eye to it. ‘A squab
old whaler, as I may suppose by her boats; Cape Horn topgallant-
masts; a sawed-off square sea-wagon after the true Nantucket
pattern.’
‘I’ve been a-waiting for you to come on deck,’ said the carpenter.
‘We don’t want to run her down. We’ve got nothen to say to her, and
so ‘ud better keep out of hail. Shift the course, will you, sir?’
There was nothing in the sir to qualify the offensive tone of
command with which he addressed me. I looked at him fixedly,
taking care, however, to keep a good grip on my temper.
‘What are you afraid of?’ I asked. ‘Are any of the crew likely to hail
her if we pass within speaking distance?’
‘I’d like to know what man there is amongst us as ‘ud have the
courage to do it,’ he exclaimed, his face darkening to the thought,
and his eyes travelling up and down my body, as though in search of
some part on which to settle.
‘Why do you wait for me to shift the helm, man?’ said I.
‘The navigation’s in your hands,’ he answered sullenly; ‘if your
calculations don’t turn out correct, it musn’t be because of any man
a-meddling with the course whilst you was below.’
Miss Temple at this moment arrived on deck and joined me.
‘A pity to run away,’ said I; ‘we’re sailing three feet to that chap’s
one, and will be passing him like smoke. There’s been nothing to
look at for a long time. It’ll be a treat to our shore-going eyes to see
a strange face, though we catch but a glimpse. You don’t think I’ll
hail her, I hope?’
‘I hope!’ he responded with a coarse ironical sneer and a rude
stare of suspicion.
‘By God, then!’ said I, with an effusion of temper I instantly
regretted, ‘since you have forced this command upon me, I’ll take
what privileges it confers, and be hanged to it! My orders are to
keep the ship as she goes. If you disobey me, I’ll call the crew aft,
and charge them to observe that any miscalculations in my
navigation will be owing to your interference.’
The fellow scowled, and looked ahead at the vessel, and then at a
knot of sailors who were standing at the galley, and I could see that
he was at a loss; in fact, a minute after, never having spoken a
word, during which time he frequently sent his gaze at the craft over
the bow, he abruptly crossed to the lee side of the deck and fell to
patrolling, coming now and again to a stand to leeward of the sailor
at the helm, with whom he would exchange a few words, whilst he
swayed on his rounded shanks, with his arms folded upon his breast,
occasionally stooping to obtain a view of the whaler under the curve
of the fore-course.
It was his watch below, and at another time he would have
promptly gone forward. His remaining on deck signified an insulting
menace, an impudent threat to watch me, and to guard his own and
the crew’s interests against me. But I was resolved not to seem to
notice his behaviour, nor even to appear conscious of his presence.
We were carrying a grand sailing wind out of the south, and under a
main top-gallant sail and a boarded main tack, the barque was
sweeping nobly over the powerful heave of the long Pacific swell,
and through the tall surges which were breaking in foam far as the
eye could reach, with deep blue lines between. At intervals, some
great hill of waters sparkling to the flying sunshine would flash into
foam to the buoyant rise of the glittering metalled forefoot of the
speeding, milk-white fabric, and cloud her forecastle in a storm of
snow. The wind sang in the rigging with a frosty note, but the
shrewd air was dry, without any sting of ice, though there was no
warmth whatever in the white splendour of the leaping sun.
The men observing that Lush kept the deck, came out of the
galley and forecastle, and with abrupt shifting motions gradually
drew aft to the line of the quarter-deck rail, which they overhung,
feigning to watch the ship we were overtaking, though nothing could
be more obvious than their real motive in drawing aft in this fashion.
Wetherly alone kept forward. He stood leaning in the galley door,
smoking a short pipe in as careless and unconcerned a posture as
you would look to see in a lounging fellow sailing up the river
Thames.
‘The brutes are terribly in earnest,’ said I to Miss Temple, as we
stood together under the lee of the weather quarter-boat for the
shelter of it. ‘If ever I had had a doubt of the wisdom of my conduct
in this business, the presence of that group yonder would extinguish
it for good and all.’
‘Forgive me,’ she exclaimed; ‘but were you well advised in not
altering the course of this vessel?’
‘The fellows must not know that I am afraid of them, or believe
me to be without some resolution of character.’
‘What would happen were you to attempt to hail that ship there?’
she asked, with her eyes enlarging to the fear that accompanied the
question, and her lips quivering as they closed to a blast of wind
sweeping in a long howl betwixt the rail and the keel of the boat.
‘I do not intend to hail her,’ I replied; ‘and we will not, therefore,
distract our minds with conjectures. Let us rather wonder,’ I went on,
forcing a light air of cheerfulness upon me, ‘what those whalemen
will think of you when they catch a sight of your figure? Will they
take you to be captain or chief mate?’
She smiled, and slightly coloured. Indeed, at a little distance, with
the rail to hide her dress, she would very well have passed for a
young man, habited as she was in Captain Braine’s long pilot coat
and his wide-awake, which entirely hid her hair to the level of her
ears, and which she kept seated on her head by means of a piece of
black tape passed under her chin. But shall I tell you that her beauty
borrowed a new and fascinating freshness of grace from the very
oddity of her attire? For my part, I found her more admirable in the
perfections of her face and form, grotesquely clothed as she was,
than had she come to my side but now from the hands of the most
fashionable dressmaker and the most modish of hairdressers and
milliners.
The name of the old whaler lifted clear in long white letters to the
heave of her square stern off the spread of froth that raced from
under her counter: Maria Jane Taylor was her title, and I remember
it now as I can remember very much smaller matters which entered
into that abominable time. The green and weedy and rust-stained
fabric, heeling to the pressure of the wind, and making prodigious
weather of the Pacific surge as she crushed into the violet hollow
with a commotion of foam such as no whale which ever her boats
had made fast to could have raised in its death-agony, swarmed and
staggered along with frequent wild slantings of her spars, upon
which her ill-patched sails pulled in disorderly spaces. A whole mob
of people, black, orange-coloured, and white, stared at us from
under all kinds of singular headgear over her weather rail, and a
man swinging off in the mizzen shrouds, apparently waited for us to
come abreast to hail us. As our clipper keel swept in thunder to her
quarter, scarcely more water than a pistol-shot could measure
dividing us, Lush came up from to leeward and stood beside me, but
without speaking, simply holding himself in readiness—as I might
witness in the sulky determined expression in the villain’s face—to
silence me if I should attempt to hail. I glanced at him askant,
running my eye down his round-backed muscular figure, and then
put on a behaviour of perfect insensibility to his presence.
‘How touching is the sight of a strange face,’ said I to Miss Temple,
‘encountered in the heart of such a waste as this! Rough as those
fellows are, how could one take them by the hand! with what
pleasure could one listen to their voices! Would to God we were
aboard of her!’ And I brought my foot with a stamp of momentary
poignant impatience to the deck.
Our own crew staring at the whaler over the quarter-deck
bulwarks were incessantly bringing their eyes away from her to fix
them upon me with a manner of angry suspicion that it was
impossible to mistake. The noise of the roaring of the wind in her
canvas was loud in the pouring air; the blue waters foamed viciously
to her tall catheads, and her green and rusty bends showed raggedly
amid the frothing, foaming, and seething curves of the boiling
smother rushing past her; here and there aft was the muddy glint of
a disc of begrimed window amid the line of her seams, out of which
all the caulking appeared to have dropped. We were passing her as
a roll of smoke might.
‘Barque ahoy!’ bawled the long slabsided man in the mizzen
rigging in the nasal accents of the ‘longshore Yankee.
Lush at my side stood grimly staring. Several of the crew on the
quarter-deck were now watching me continuously.
‘What barque air you?’ came in a hurricane note out of the
whaler’s mizzen shrouds.
There was no reply from us.
‘Barque ahoy, I say!’ yelled the man with a frantic gesture of
astonishment; ‘where air you bound, and what ship might you be?’
The Lady Blanche rushed on; nevertheless, we were yet so close
to the whaler even when we had her on our quarter that I could
easily distinguish the features of the man who had hailed us as he
hung motionless, as though withered by some blast from the skies,
in the mizzen rigging, with his mouth wide open, whilst an
expression of inimitable amazement was visible in the rows of faces
along the bulwark rail, white and coloured alternately, like the keys
of a pianoforte.
On a sudden the man sprang out of the mizzen shrouds on to the
deck; his legs were immensely long, and he was habited in a short
monkey jacket. He started to run for the forecastle, and his
prodigious strides made one think of a pair of tongs put into motion
by some electrical power. He gained the forecastle head, where for
one moment he stood surveying us, then bringing his hands to his
face, he made what is known to schoolboys as a ‘long-nose’ at us,
turning a little sideways, that we might clearly observe the
humiliating derisiveness of his posture. In this attitude he remained
whilst a man might have counted twenty, then turning his back upon
us, he smote himself with a gesture of utmost scorn upon a part of
his body which the short skirts of his monkey jacket left partially
exposed; after which, with the air of a person whose mind has been
relieved, he leisurely made his way aft, thrice, as he walked, turning
his profile, that we might observe him lift his thumb and fingers
again to his nose. A little while later the old whaler was plunging
amid the white throbbings of her own churning a long mile astern;
and in half an hour she looked to be scarcely more than a gleam out
in the cold blue air, where there seemed a dimness in the
atmosphere as of the blowing of crystals off the melting heads of the
high seas.
It was not till then that Lush left the deck.
This little incident was as stern a warrant of the disposition of the
crew as they could have desired to make me understand. It proved
their possession of a quality of suspicion, of a character so
ungovernably insolent and daring, that I might well believe, were it
transformed into passion by disappointment or insincerity on my
part, there was no infamy it would not render them equal to. I often
wonder in recalling this time that I should have found strength to
bear up under my anxieties. The future lay absolutely in blackness. I
had some hope, some vague fancy, rather, let me call it, of lighting
upon an island, should Braine’s prove the chimera I feared it was,
that might enable me to contrive a stratagem to effect our
deliverance from this unspeakable situation. But there was nothing
in such an imagination as this to cast the faintest light upon the
gloom ahead. I would cudgel my brains in my lonely watches at
night with vehement struggles in search of any idea that might be
shaped into a method of escape. At intervals I would secretly and
warily converse with Wetherly; but he had no other proposals to
make than the souldepressing one of patience, with regular
assurances, indeed, that he would stand by me if his help could be
safely ventured.
In these despairful considerations I even went to the length of
fixing my thoughts upon the boats. When we should have rounded
the Horn and entered the mild parallels of the Pacific, sparkling
nights of tranquillity were sure to descend upon us, and furnish me
with an opportunity of leaving the barque with Miss Temple; an
opportunity, I say, so far as the weather and the peace of the sea
might be concerned; but how with my single pair of hands was I to
lower a boat, provide that Miss Temple should be in her, provide also
that the little fabric should be stored with food and water, then
unhook her, and slide away into the gloom, all so privily, all so
noiselessly as to elude the vigilance of the man at the helm and of
the seamen in my own watch sprawling about the decks forward?
It was not to be done. I did not even suggest this method of
deliverance to Wetherly, feeling perfectly convinced that he would
not entertain it. And suppose I should be able to successfully get
away with the girl in this manner, how dreadful would be our
outlook! with oars, indeed, but without masts or sails, lying exposed
for God alone could tell how long a time in the heart of one of old
ocean’s mightiest deserts, not traversed then, as in these days;
scarcely penetrated, indeed, save at long times between, by such a
whaler as we had passed, or by some vessel trading to the
Polynesian groups from the western South American seaboard.
I do not know that I considered myself very fortunate because of
the fine weather which attended the barque in her passage of the
Horn. Far better, I sometimes thought, than the strong southerly
breeze, the flying skies of dark winter blue, the brilliant rolling and
foaming of long arrays of billows brimming in cream to the ivory
white sides of the little ship, and aiding her headlong flight with
floating buoyant liftings and fallings that timed the measures of her
nimble sea-dance with her waving mastheads as the batôn of a band
conductor keeps the elbows of his fiddlers quivering in unison—far
better might it have been for us, I would often think, had the month
been the mid-winter of the Horn, with heavy westerly gales to
oppose our entrance into the Pacific Ocean, and fields of ice to
hinder us yet, with some disaster on top to force us to bear away as
the wind might permit for the nearest port.
The rounding of this iron headland was absolutely uneventful; the
wind blew almost continuously from the southward, and throughout
was a strong and steady breeze, that enabled me to show whole
topsails and a maintopgallant-sail to it. Once only did we sight ice, a
distant spot of a luminous crystalline whiteness upon the throbbing
limits of the sea. Day and night the water in white clouds poured in
thunder from either bow of the rushing barque; the clouds soaring
from out the Antarctic solitudes down behind the ocean line, swept
in smoke athwart our trucks; by day the small white sun danced
amongst these fleeting shadows in the north, and flashed up the sea
into a very dazzle at each blinding launch of his beams, so
multitudinous were the peaks of froth which glanced back the
sparkling emissions of the luminary; by night the dark skies were
filled with stars of a frosty brilliance, amid which burned the jewels
of the Southern Cross with the Magellanic clouds beyond dim as
curls of vapour. A fire was lighted in the little stove in the cabin, and
by it, during my watch below, Miss Temple and I would sit
exchanging our hopes and fears, speculating upon the future,
endeavouring to animate each other with representations of our
feelings when we should have arrived home, and amid safety and
comfort look back upon the unutterable experiences into which we
had been plunged by so trifling a circumstance as a visit to a wreck.
Thus passed the time. Every day I obtained a clear sight of the
sun, and then striking the meridian of 76° West, I headed the
barque on a north-north-west course for Captain Braine’s island, the
declared situation of which I calculated would occupy us about three
weeks to reach.
It was on the afternoon of the day on which I had shifted the
barque’s helm, that Wilkins came to me as I sat at dinner with Miss
Temple with a message from the carpenter to the effect that he
would be glad of a word with me. I answered that I was at Mr.
Lush’s disposal when I had dined, but not before. This did not
occupy another ten minutes in accomplishing; my companion then
withdrew to her cabin, having with much eagerness expressed a
number of conjectures as to the carpenter’s motive in soliciting an
interview.
The man came off the poop by way of the quarter-deck and
entered the cabin with his skin cap in hand.
‘I obsarve,’ said he, ‘that you’ve altered the vessel’s course.’
‘That is so,’ I rejoined. ‘Wetherly was on deck when I left my cabin
after working out my sights, and I believed he would have reported
the change of course to you.’
‘No; it was Woodward [one of the sailors] that was at the hellum.
He calls me over and points into the binnacle and says: “Ye see
what’s happened?” The men ‘ud be glad to know if it’s all right?’
‘If what is all right?’
‘Why, if this here course is true for the island? They’ll feel obliged
if ye’ll let ’em in here and show ’em the chart and ‘splain the
distance and the course and the likes of that to ’em yourself.’
I hardly required him to inform me of their wishes, for I had but to
direct my glance at the cabin door to observe them assembled on
the quarter-deck awaiting the invitation the carpenter had come to
demand; all hands of them, saving Wetherly and the fellow that was
steering, called Woodward by Lush.
‘Certainly: let them enter,’ said I; and at once fetched my chart,
which I placed upon the table, and went to the other side, ruler in
hand, ready to point and to explain.
The body of rough men, a few of them with their mahogany
lineaments scarcely visible amidst the whiskers, eyebrows, and falls
of front hair which obscured their countenances, stood looking upon
the chart with Lush in the thick of them, and Forrest’s mutinous,
daredevil, rolling face conspicuous over the carpenter’s shoulder.
‘Now, men, what is it you want to know?’ said I.
‘We’re a steering by the compass up above nor’-nor’-west,’
answered Lush; ‘will ye be pleased to tell us how ye make that
right?’
I had to fetch a pair of parallel rulers to render my answer
intelligible to the illiterate creatures who stood gaping at me with an
expression of dull struggling perception that would come and go in a
manner that must have moved me to laughter at another time.
‘What part of this here paper is the island wrote down upon?’
demanded Forrest.
I pointed with my ruler, and the whole knot of faces came
together as they stooped with a sound as of a general snore arising
from their vigorous breathing.
‘How far is it off from where we are?’ inquired one of the men. I
told him. Several questions of a like kind were put to me; a growling
ran amongst them as they hummed their comments into one
another’s ears. Meanwhile, I stood inspecting them with mingled
inquisitiveness and disgust. What a miserable pass had the wretches
brought the girl and me to! What bitter anxieties had they
overwhelmed us with! What was to be our future so far as they
should have a share in the creation of it? I sought in vain amidst
their various countenances, composed of hair and warts and beards,
of leathery skins, of moist eyes dim with weather, of the smooth
cheeks of two or three of the younger fellows—I sought in vain, I
say, for a single expression to assure me of the existence of qualities
upon whose generous response I might depend, should it ever come
to my having to entreat them. Yet they presented, as I long ago
said, just such exteriors as you would expect to meet with in the
sailors of a humble trader like the Lady Blanche.
‘Well, men,’ exclaimed the carpenter, ‘there ain’t no doubt to my
mind. It’s all right; and I’m bound to say stan’ing here, that con-
sidering that Mr. Dugdale guv’ up the sea a good bit ago, he’s
managed oncommonly well down to this here time.’
There was a murmur of assent. I thought I would take advantage
of this momentary posture in them of appreciation, perhaps of
concession.
‘Since you are all before me,’ said I, ‘two excepted, let me ask you
a question. You are aware, of course, that from the very beginning
of this business I have regarded your whole scheme as the effect of
a madman’s dream.’
Lush stared at me with an iron face; Forrest, with an impudent
grin, shook his head; two or three of the fellows smiled
incredulously. I proceeded, eyeing them deliberately one after the
other, and speaking in the most collected tones I could command.
‘I want to know this: If Captain Braine’s island should have no
existence in fact, what do you men propose to do?’
‘No use putting it in that way!’ exclaimed the carpenter, after a
brief pause, and a slow, sour wagging of his head; ‘the island’s
there. ‘Tain’t no dream. Ye’ll find it right enough, I’ll warrant.’
‘It was described to me,’ I went on, ‘as little more than a reef. This
is a big sea, men. A reef is easily missed in such an ocean as this.’
‘You have its bearings,’ exclaimed Forrest defiantly; ‘if you put the
barque in the place on the chart where the captain said the island is,
how are we agoing to miss it, unless all hands turns puppies, and
keeps a lookout with their eyes shut?’
‘But,’ said I, preserving my temper, ‘may not this hope of obtaining
a large treasure have rendered you all very considerably
overconfident? Suppose there is no island. Reason with me on that
supposition. Imagine that we have arrived, and that there is nothing
but clear water. Imagine, if you will, that we have been sweeping
those seas for a month without heaving into sight your late captain’s
reef. What then, I ask? What next steps have you in your minds to
take? I have a right to an answer, even though I should address you
only in the name of the young lady whose protector I am.’
The fellows glanced at one another. Their low, suspicious
intelligence manifestly witnessed some strategic fancy underlying my
question.
‘Look here, Mr. Dugdale,’ exclaimed the carpenter, ‘there’s no use
in your a-putting it in any other way than the way we want, and the
way we mean to have.’ He accompanied this with a violent nod of
the head. ‘Though we’re plain men without e’er a stroke of book-
learning amongst us, we ain’t to be made fools of. The island’s
where ‘ee can find it, if ye choose, and to that there island we’re
bound, sir;’ and he bestowed another emphatic, malevolent nod
upon me.
I gazed at the fellows in silence. One glance at the array of mulish
countenances should have satisfied me that there was nothing in
anything I could say to induce in them other views than those they
held, or to render endurable to them a discussion that must be
based upon a probability of their being disappointed.
‘We’ve stuck to our side of the bargain, sir,’ said one of them.
‘Ay,’ cried the carpenter; ‘I allow that let the gent strive as he may,
there’s nothen he can find in the treatment him and the lady’s met
with from us men to complain of.’
‘I do not complain,’ I exclaimed; ‘have you on your side any
reason to complain?’
‘No, sir, and we don’t want none,’ the fellow responded with a look
that rendered his words indescribably significant.
‘You are satisfied, I hope,’ said I, ‘with the explanation I have
given you as to the situation and course of the barque?’
‘Yes,’ answered the carpenter, with a look round.
‘Then there is nothing more to be said,’ I exclaimed, and picking
up the chart, I carried it into my cabin.
CHAPTER XXXVIII
LAND!

Our progress was slow. For some while we carried strong winds,
which swept us onwards into the softer climates of the Pacific; they
then failed us, and were followed by a succession of light airs, as
often ahead as astern. I was astonished, however, by the yacht-like
qualities of motion of the little barque. Through weather that had
scarcely weight enough in it to have stirred the Countess Ida, the
Lady Blanche would sneak over a surface of water that was often
glass-like, ripples fine as wire breaking away from her keen stem,
and a short wake scoring the liquid smoothness under her counter;
her topsails and courses motionless, save but for their soft swaying
to the long and gentle respiration of the swell; a faint lifting,
however, perceptible in the light cloths of the loftier sails, which
were doing the work of the rest, and communicating to the little
fabric out of the delicate softness of the blue Pacific heavens, so to
speak, an impulse of vitality, the recollection of which would move
me to amazement when I found that our progress in the twenty-four
hours had been as considerable as the Indiaman would have got out
of a pleasant breeze.
But not to linger upon this time—though I could tell much of my
incessant intimate association with Miss Temple—dwell with delight,
untinctured by recollection of the miseries and anxieties of this
passage, upon the memory of the soft and lovely nights of those
delicious parallels, the clear dusk radiant with the glistening of stars
from sea-line to sea-line, the mild atmosphere, sweet with dew, the
hush upon the slumbering leagues of the deep, soothing as a
benediction to the perturbed spirit, the play of delicate fires in the
water, the stirring of canvas in the still gloom aloft, as of the
brushing of the pinions of hovering creatures: then the wide blue
sparkling scene of day, the barque clothed in the ivory whiteness of
her canvas striking a prismatic shadow of pearl from her white sides
and silken heights into the opalescent profound, on which she would
rest as on a bed of glass, some distant fountain and curve of wet
black body denoting the rising of a leviathan from the depths—ah!
had all been well with us, this would have made a noble time for the
memory to muse on—but my story draws me to its conclusion.
It was February the 18th, as very well indeed do I remember.
From the hour of our having sighted the whaler off Cape Horn, we
had met with nothing, not even of the bigness of the tip of the wing
of a sea-fowl, to break the continuity of the sea-line, no shadow of
low-lying land, no vision of star-like space of water indicating the
froth of the submerged reef. On this day at noon, having worked out
my calculations, I discovered that the distance to Braine’s island, as I
may call it, from the then situation of the barque, was to be
traversed, if the light air held as it was, in about twelve hours; so
that it would be proper to keep a lookout for it at about midnight.
I gave Mr. Lush this piece of news; he received it with a flush of
excitement that almost humanised the insipid coarseness of his dull,
wooden, leather-bound, weather-hardened visage.
‘Ye may calculate upon our keeping a bright lookout, sir,’ said he
with a grin that disclosed his tobacco-coloured fangs, and that might
fairly be called sardonic, since the eyes bore no part in this
disagreeable expression of satisfaction.
I watched him walk forwards to convey the information to the
men. They went in a whole body on to the forecastle, and stood
staring about them, as though the ocean wore a new countenance
to their gaze, now that they believed Braine’s island to be a short
distance past the slope of it. The carpenter pointed, and was full of
talk; there was much lighting of pipes, expectoration, puffing of
great clouds indicative of emotion, uneasy, impatient, flitting
movements amongst the men, some of whom presently broke up
into couples and fell to pacing the forecastle like marines on sentry;
talking, as I did not doubt, of the money they were going to dig up,
what they would do with it when they had it, and so on; the
expressions on their faces varying at every instant, one emotion
suppressing another in a manner that to a contemplative and
leisurely eye would have provided a study at once ludicrous and
informing.
I had the watch that afternoon; and when Miss Temple and I had
eaten our little midday meal, I drew chairs into the shadow of the
short awning, and we sat together, I, pipe in mouth, occasionally
quitting her side to take a look outside the edge of our canvas roof,
along with a brief stare ahead, for I could not be sure of Captain
Braine’s chronometer, nor of the exactness of my own calculations,
and if the madman’s island was where he had declared it to be, it
might heave into view off either bow or right ahead at any moment,
for all I could tell.
Miss Temple stood in no need now of Captain Braine’s overcoat.
She was habited in the costume of the Countess Ida; somewhat
soiled it was, yet the perfect fit of it continued to atone for its
shipwrecked airs. Her dark eyes glowed under the shadow of the
straw hat she had had on when she left the Indiaman. She needed
but her jewelry, the flash and decoration of her trinkets, to show
very nearly as finely as she had on that day. There was but little
alteration visible in her. For my part I could detect no more than that
her face was a trifle thinner than when we had first entered on this
wild adventure. The eye of close and constant association would not
indeed witness changes which might instantly be perceptible to one
encountered after an absence. Still, I had the image of her brilliant
on my mind as she was on board the Indiaman, and viewing her
now, as I say, I could perceive no other change than what I have
mentioned. Intellectually, however, there was an alteration, defined
to a degree to my sight. Her gaze was softened, and was often
sweet. The characteristic firmness of her lips had lost its air of
haughtiness. There was no longer any manner of command in her
looks, nor of exaction in her fixed regard; there was nothing to hint
that her spirit was broken—merely that it had been bowed to an
average human level by the rough usage of the sea, and by the
amazing experiences with which her months of lonely association
with me had been surcharged.
Heretofore, that is to say for some weeks past, she had exhibited
a resigned, calm, resolved behaviour, as of one who was constantly
schooling herself to prepare for an issue of life or death. She had
long ceased to utter a complaint; she would even detect a sigh in
herself with a glance of contrition and self-reproach. Again and again
had I complimented her upon the heroic qualities which her
sufferings of mind and body had fructified in her; but this afternoon
she was feverishly impatient and restless. The old fires of her spirit
when alarmed were in her eyes. I would observe her struggling in
vain to appear composed. As we sat together, she exclaimed, as she
brought her eyes to my face from a nervous sweeping gaze at the
horizon over the bows: ‘By this time to-morrow we shall know our
fate.’
‘Perhaps not. Yet I pray it may be so. If I were sentenced to be
hanged, I would wish the hour come. But what is to be our fate?
Nothing in this life is so bad or so good as our fears or our hopes
would have us think. If there should be no island—— Well, those
villains will find me on the alert for what may come along in the
shape of chance, and you must be ready.’
‘I am ready,’ she exclaimed; ‘only tell me what to do. But this
expectation——’ Her lips trembled, and her white fingers clenched to
the agitation that possessed her. ‘The misery is, Mr. Dugdale, you
have no scheme.’
‘That will come,’ I exclaimed; ‘be calm, and remain hopeful. I
might, in the language of the heroes of novels, hope to reassure you
by promising that if we are to perish we will perish together. I am
not a hero, and I talk with the desire and the intention of living.
There may be a few more adventures yet before us; but your hand
is in mine, and I shall not relinquish it until I conduct you to your
mother’s side.’
Of course I talked only to cheer her; yet I hoped even as I spoke,
and my hope gave a tone of conviction to my words that seemed to
animate her, and she smiled whilst her wistful eyes sank, as though
to a sudden reverie.
During the rest of the day the crew were ceaselessly on the move,
passing in and out of the galley and in and out of the forecastle,
pacing the planks with impatience strong in their rolling gait; one or
another of them from time to time springing on to the head rail to
peer thirstily and steadfastly under the shelter of his hand; one or
another again at long intervals ascending to the height of the
foreroyal yard, there to linger, whilst the fellows below gazed up with
expectant faces, and ears greedy for a cry from that lofty summit.
The sturdy figure of the carpenter was conspicuous amongst them.
When he came aft, he would look as though willing to converse with
me, but I walked away abruptly on his approach, and if I chanced to
leave the cabin when he was on deck, I kept to the lee side,
contriving an air that even to his unintelligent gaze must have
conveyed the assurance that I wished to have nothing to do with
him.
The breeze was light, just forward enough on the beam to allow of
the foretopmast studding-sail remaining abroad. So weak was the
air, that the barque crept along with erect spars, and the red fly of
the dogvane scarcely flickered to the soft breathings at the royal
mast head. I feared that it would fall a dead calm at sun-down, but
greatly to my satisfaction, there was a small freshening in the breeze
whilst the scarlet yet lay gloriously upon the cloudless countenance
of the west. Indeed, my own almost crazy anxieties and expectation
made the mere fancy of a spell of stagnation abhorrent to me.
Supposing the chronometer below to be correct, I was in little doubt
of the accuracy of my computations, and my desire to verify or
disprove the madman’s assurance was consuming and insupportable.
When the night descended it was moonless, and through the
pleasant blowing of the wind, of a singular sweetness and freshness
such as I could not imagine of darkness in any other ocean. The
water was now streaming in a line of whiteness along either side,
and the murmur under the counter was as constant as the voice of a
running brook heard amid the stillness of a summer night. The
carpenter had the watch from eight to twelve; but for my part I
could not find it in me to go to my cabin. Such was my feverishly
restless condition, that I knew I should close my eyes in vain, and
that the inactivity of a recumbent posture would speedily grow
irksome and intolerable. Miss Temple entreated me to lie down upon
the locker in the cabin. I answered that I should be unable to sleep,
and that without sleep the mere resting of my limbs would be of no
service to me.
‘But you will have to watch from twelve to four,’ she exclaimed,
‘and at this rate you will get no sleep to-night.’
I smiled, and answered that Braine and the carpenter between
them had murdered sleep; and then took her on deck, where we
walked and conversed till the hour of eleven—six bells. I then
returned with her to the cabin. She declined to enter her berth; she
begged me, and her eyes pleaded with her voice, to suffer her to
remain at my side throughout the night. But this I would not hear
of; I told her that such a vigil would exhaust her, that her utmost
strength might have to be taxed sooner than either of us could
imagine; that she must endeavour to obtain some repose upon the
locker, and that if anything resembling land showed during my
watch, I would call her. I saw a look of reproachful remonstrance in
her face; but compliance was now a habit with her, and in silence
she allowed me to arrange a pillow and to throw a light blanket, that
I fetched from her bed, over her feet. I sat near her at the table,
leaning my cheek on my elbow, and from time to time exchanged a
few words with her. There was hardly any movement in the sea. The
wind held the canvas motionless. The seething alongside was too
delicate to penetrate, and the silence in the little cuddy was
unbroken save by the ticking of a small brass clock under the
skylight, and by the measured tramp of the carpenter overhead.
A little before twelve I looked at my companion, and perceived
that she was asleep. On the eve, as I believed we were, of God
alone knew what sort of events, the spectacle of the slumbering
unconscious girl, whose beauty was never so affecting as when
softened, and I may say spiritualised by the expression of placid
repose, moved me to the heart. What a strange association had
been ours! How intimate had we become! what confidences had our
common suffering caused us to exchange! what condition of
shoregoing life was there that could have brought this girl and me
together as we had been and still were? How I loved her, I was now
knowing; I could dwell upon my passion with delight as I looked at
her, though on the threshold of a future that might prove terrible
and destructive to us both. What was the secret of her heart, so far
as I was concerned? I gazed at her lips with some unintelligible hope
of witnessing them shape the syllables of my name; then the clear
chimes of eight bells floated aft. With a sigh and a prayer, I dimmed
the cabin lamp and went softly to the companion steps.
On my emerging, the carpenter came up to me.
‘It’s been blowing a steady air o’ wind,’ said he; ‘allowing for this
here improvement in our pace, what time d’ye reckon the island’ll
take to show itself?’
‘If it exists,’ I answered, ‘it might be in sight now. The captain’s
description showed that there was no height of side to make a loom
of. If you’re going forward, see that a couple of hands are stationed
on the forecastle, and tell them to keep a bright lookout. We don’t
want to run the reef down, if it’s there.’
‘Ay, ay, sir,’ he exclaimed in the rough off-hand voice of a sailor
receiving an order, and left the poop.
The time crept away. There was a light burning in the galley; and
the shapes that flitted in and out through the open door, throwing
giant shadows upon the hazy square of illumination on the bulwark
abreast of the galley entrance, satisfied me that most if not all of the
men were awake and on the lookout. Several figures, never less
than two, paced against the stars over the bows with the regular
tread of sentinels, clear on the forecastle under the forecourse by
the spaces of the spangled sky they blotted out as they moved. The
breeze continued a pleasant air, and all about the gliding barque
were the summer tinkling sounds of water gently broken.
Occasionally, I would go forward, and taking my stand on the rise of
the cathead where it sloped to the rail, strain my eyes into the
elusive starry dusk where sea and sky seemed to melt into liquid
gloom. No one accosted me as I passed to and fro. Once I heard the
tones of the carpenter in the galley warm in argument. The fellows
pacing the forecastle would come to a halt whenever I went
forward, and stand looking at me in silence, full of expectation, no
doubt, of my being able to see more than they. The very barque
herself seemed to participate in the emotions, the breathless
curiosity, the avid yearnings of the men who awaited the appearance
of the island with restless motions and voices subdued into low
growling notes: the ship herself, I say, seemed governed by the
impassioned expectation of the hour, so tremulously breathless was
she aloft, so still and subtle was her movement through the water,
so hearkening the aspect of her forward, as though the stirless curve
of her jibs were ears which she eagerly projected that she might
catch the first sound of the wash of surf.
All this while Miss Temple lay soundly sleeping below.
It was wanting about ten minutes to four when the quarter-deck
was suddenly hailed from the forecastle. The voice rang loud and
startlingly upon the ear used to the continued stillness of the night.
‘Hallo!’ I cried.
‘There’s something dark right ahead,’ came back the answer.
I whipped the glass out of the companion, and walked swiftly
forwards where all the crew had run to the first cry, and where I
found them standing in a huddle of shadowy shapes at the rail,
some pointing, and all looking in one direction.
‘Where away is the object reported?’ I exclaimed.
‘Yonder,’ cried the carpenter, stepping out of the little crowd and
projecting his arm almost on a line with the jib-boom end.
I instantly perceived it! It was just a streak of shadow, low-lying,
like a line of cloud beheld by night lifting a few fathoms of its brow
above the sea-line. I pointed the telescope; and the lenses without
revealing features, resolved the length of airy obscurity into the firm
proportions of land.
‘Is it the island, sir?’ demanded the carpenter in a voice hoarse
with excitement.
My own astonishment—the wonder raised in me by yonder prompt
settlement of the incredulity that had possessed me from the first
minute of hearing the captain’s story—the conflict of emotions which
followed on my considering that the land ahead must inevitably be
Braine’s island, since the chart showed clear water to the distance of
the latitude of Easter Island, which the low stretch over the bows
most assuredly was not, the loom being little more than that of a
reef—rendered my ear deaf to the carpenter’s inquiry. He repeated
his question.
‘If not, then I know not what other land it can be,’ said I. ‘How far
distant will it be, think you?’
The men gathered about us to hear what was said.
‘Three mile about,’ he answered.
‘More like five,’ grumbled out a seaman.
‘Five in your eye!’ cried another—‘more like tew. If ye’ll stay your
breathing, you’ll hear the wash o’ the surf.’
‘Better shorten sail and wait for daylight, Mr. Lush,’ said I.
‘Ay, ay, sir,’ he answered; ‘that’ll be the proper thing to do;’ and
instantly fell to bellowing out orders.
The uproar of the excited crew clewing up and hauling down,
yelling as they pulled at the ropes, and springing about with an
alacrity that made their darting figures resemble those of madmen,
awakened Miss Temple. I stood alone on the poop, endeavouring to
obtain a view of the land by leaning over the rail, when she came up
to me.
‘What is it, Mr. Dugdale?’
‘Land!’ I exclaimed, instantly turning to her.
‘The island?’ she cried, suppressing astonishment until she should
have received my answer.
‘I have no doubt of it. The shadow indicates that it is little more
than a reef. Its bearings, according to my computation, accurately
correspond with those given by Captain Braine.’
She projected her head over the rail, but was some time before
she could distinguish the mere dash of gloom that the land made
upon the horizon.
‘If it should be the island!’ she cried. ‘That you should have
steered this ship straight as an arrow for it, and that it should be
there—no madman’s dream, as we have both believed it! If one part
of the story be true, the other part should be so.’
I was too astounded to converse. I could do no more than
ejaculate. To be sure, as my companion had said, if the story of the
island was true, the story of the gold might be equally true. There
would be the treasure, then, for the men to possess themselves of!
And afterwards?
My brains seemed to whirl like a teetotum in my skull.
Meanwhile, the sailors had reduced sail till the barque was now
under topsails only, the rest of the canvas hanging from the yards in
the grip of its gear. The carpenter arrived on the poop.
‘Mr. Dugdale,’ he exclaimed, in a rough, congratulatory voice,
‘you’ve done wonderfully well, sir. By ——! but I don’t think there’s
e’er a navigator would have struck it true as a hair as ye have. Ye’ve
got no doubts now left, I allow?’ and I saw his face darken with the
wrinkles of the grin that overspread his countenance.
‘What’s to follow?’ I demanded, thinking to take advantage of his
mood.
‘Why, the gold,’ he answered, ‘the money, sir; what we’ve been a-
waiting for; and what I suspects we’ll most of us know what to do
with when we gits it.’
‘And then?’
‘That’ll be a matter for consideration,’ he answered, drawing off
and going to the rail and staring ahead.
‘Back the topsail yard and bring the ship to a stand, Mr. Lush,’ said
I, ‘and get a cast of the lead, will you?’
These orders were immediately obeyed. The lead ran out to the
whole scope of line without touching bottom. There was nothing
now to be done but to wait for daylight. A whole eternity seemed to
pass before the dawn broke. Then to the sifting of the dull gray
faintness over the rim of the eastern sea, the land came stealing
out, till, to the sudden soaring of the sun into the clear blue sky of
the Pacific morning, it flashed out into its full proportions and
distinctive features not a mile off our port beam as we then lay with
our maintopsail aback.
The crew, neglecting all discipline and shipboard habit, were
assembled in a body on the poop; and thus we all stood looking, I a
little distance away from them with Miss Temple at my side. It was a
small coral island, apparently of the dimensions that Captain Braine
had named. To the northward the smooth water brimmed to a long
shelf of coral grit, lustrous as snow in the sparkle of the early
sunshine. There was a small rise, green with vegetation, in the
centre of the island; how far distant, I could not imagine. Almost
abreast of us, the land went in with a semicircular sweep like to a
horseshoe, and was exactly the lagoon that had been described by
Captain Braine. In the centre of it, just as he had marked the thing
down upon his chart, rose a coral formation of the appearance of a
very thick pillar, and at the distance from which we surveyed it, it
might easily have passed for a monument of white stone erected by
human hands, the decorated summit of which had been rudely
broken off by a tempest or some volcanic shock. On a line with this
pillar, some little distance up the beach of the lagoon, were several
clumps of trees. There was a deal of a sort of stunted vegetation
going inland from the margin of the little bay, coarse grass, as my
telescope made out, tangles of bushes, and so on.
The carpenter in the midst of the men stood with the parchment
chart in his hand, pointing out how the outlines corresponded with
those of the land, amidst a hubbub of eager comments and
exclamations of excitement. For my part, I could not credit my
senses; I disputed the evidence of my own eyes; I brought them
away from the island to fix them with an emotion of profound
bewilderment upon Miss Temple.
‘Can it be real?’ I cried. ‘After the weeks of conviction of the utter
madness of this quest, am I at last to be persuaded that the
wretched suicide was not mad, that his island is a fact, and his gold
an absolute reality too?’
I turned my back upon the crew to press my hands to my eyes to
ease my brow of an intolerable sense of swooning in it.
‘Three cheers for him, men!’ I heard the carpenter roar out. Volley
after volley of huzzas rang from the deep sea lungs of the sailors.
They were cheering me. I turned to find them all looking my way.
They tossed their caps and flourished their arms like madmen in the
exuberance of their delight.
‘Now, sir,’ sung out the carpenter, ‘hadn’t we better see to our
ground tackle?’
‘As you will,’ I answered; ‘there is your island; I have kept my
word with you; now, Mr. Lush, the crew will proceed as they think
proper. When you require my services again as a navigator I am
ready;’ and so saying I seated myself on the edge of the skylight,
and with folded arms continued to view the island with such
astonishment and incredulity as made me fear for my head.
‘Is it all for the best, do you think, Mr. Dugdale?’ said Miss Temple,
who had seated herself beside me.
‘I cannot tell—it may be so. If they find the money, the wretches’
delight and good temper may render them willing to comply with my
wishes to make for the nearest port. I am in a dream. Give me a
little time to recover my amazement. You know it ought to be
impossible that that island should be there.’
She glanced at me anxiously, with something of alarm indeed, as
though there was even a greater strangeness in my manner than in
my language. Long hours of anxiety, long hours of sleeplessness, the
continual apprehension of what was to follow if this island was not
discoverable, these things and how much more had done their work
with me; and now on top was come the shock of the discovery of
the truth of what I had all along been convinced was the dream of a
madman—the lie of a crazy head! I felt a moisture in my eyes; my
limbs trembled; my breathing grew thick and difficult. In silence,
Miss Temple hurried below and returned with a tumbler of cold
brandy grog. She put it into my hand, and I drank it off; and I have
very little doubt that the strong stimulant—such a dose as might
have made me boozy in an hour of ease!—rescued me from an
attack of hysterics, man as I am who tell this!
Meanwhile the seamen had gone forward, and were all hard at
work with the chain cables, connecting them with the anchors,
affixing tackles, hoisting the ponderous irons to the catheads, and
filling the barque with business and songs. They worked with
desperate will and eagerness, yet their progress was slow, and the
sun had mounted many degrees before all was ready forward for
bringing up. They then went tumultuously to breakfast, which they
devoured upon deck, emptying their hook-pots down their throats,
and hastily eating their biscuit and meat, whilst they jabbered away
in voices of enthusiasm, one calling out a joke to another amidst
loud laughter.
The carpenter had now taken command. He came aft while Miss
Temple and I nibbled at some breakfast which Wilkins had brought
us on deck, and ordered the maintopsail to be swung, and stationed
a hand with a lead-line in each of the main-chains. The wind was
about south, and allowed the barque with her yards braced fore and
aft to very nearly look up for the lagoon. We crept slowly along; the
lead on either hand went in frequent flights towards the bow, but no
bottom was reported. This went on till the yawn of the lagoon was
upon our starboard quarter, with the trend of the land covered with
bushes opening out as it ran into the south-east, and then came a
shout from the port main chains. The water now shoaled rapidly; a
man stood forward ready to let go the anchor; down thundered the
topsail yards to the cry of the carpenter to let go the halliards; the
barque lost way; the sharp clank of a hammer rang through the
vessel, followed by a mighty splash, and the roar of iron links torn in
fury through the hawse-pipes.
In a few moments the Lady Blanche was at rest, with the western
spur of the lagoon within half a mile of her.
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!

ebookball.com

You might also like