(eBook PDF) Starting Out with C++: Early Objects 9th Edition
(eBook PDF) Starting Out with C++: Early Objects 9th Edition
(eBook PDF) Starting Out with C++: Early Objects 9th Edition
(eBook PDF) Starting Out with C++: Early Objects 9th Edition
1. (eBook PDF) Starting Out with C++: Early Objects
9th Edition download
https://ebookluna.com/product/ebook-pdf-starting-out-with-c-
early-objects-9th-edition/
Download full version ebook from https://ebookluna.com
2. We believe these products will be a great fit for you. Click
the link to download now, or visit ebookluna.com
to discover even more!
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/
(eBook PDF) Starting Out with Java: Early Objects 5th Edition
https://ebookluna.com/product/ebook-pdf-starting-out-with-java-early-
objects-5th-edition/
(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/
(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/
3. (eBook PDF) Starting Out with Java Early Objects 6th Edition by Tony Gaddis
https://ebookluna.com/product/ebook-pdf-starting-out-with-java-early-
objects-6th-edition-by-tony-gaddis/
(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/
(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/
(eBook PDF) Starting out with Visual C# 5th Edition
https://ebookluna.com/product/ebook-pdf-starting-out-with-visual-c-5th-
edition/
(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/
6. "
Preface xv
Chapter 1 Introduction to Computers and Programming 1
Chapter 2 Introduction to C++ 27
Chapter 3 Expressions and Interactivity 77
Chapter 4 Making Decisions 155
Chapter 5 Looping 243
Chapter 6 Functions 323
Chapter 7 Introduction to Classes and Objects 407
Chapter 8 Arrays 507
Chapter 9 Searching, Sorting , and Algorithm Analysis 603
Chapter 10 Pointers 645
Chapter 11 More about Classes and Object -Oriented Programming 703
Chapter 12 More on ( -Strings and the string Class 815
Chapter 13 Advanced File and 1/ 0 Operations 853
Chapter 14 Recursion 915
Chapter 15 Polymorphism and Virtual Functions 949
Chapter 16 Exceptions, Templates, and the Standard Template Library (STL) 987
Chapter 17 Linked Lists 103 7
Chapter 18 Stacks and Queues 1085
Chapter 19 Binary Trees 1125
Appendix A: The ASCII Character Set 1155
Appendix B: Operator Precedence and Associativity 1159
Appendix C: Answers to Checkpoints 1161
Appendix D: Answers to Odd -Numbered Review Questions 1201
Index 1221
V
8. Preface xv
CHAPTER 1 Introduction to Computers and Programming 1
1.1 Why Program? 1
1.2 Computer Systems: Hardware and Software 3
1.3 Programs and Programming Languages 8
1.4 What Is a Program Made of? 13
1.5 Input, Processing, and Output 17
1.6 The Programming Process 18
1.7 Tying It All Together: Hi! It's Me 23
CHAPTER 2 Introduction to C++ 27
2.1 The Parts of a C++ Program 27
2.2 The cout Object 31
2.3 The# i ncludeDirect ive 36
2.4 Variables and the Assignment Statement 37
2.5 Literals 39
2.6 Identifiers 41
2.7 Integer Data Types 43
2.8 Floating-Point Data Types 48
2.9 The char Data Type 52
2.10 TheC++str i ngClass 56
2.11 The bool Data Type 57
2.12 Determining the Size of a Data Type 58
2.13 More on Variable Assignments and Initialization 59
2.14 Scope 61
2.15 Arithmetic Operators 62
2.16 Comments 66
2.17 Programming Style 67
2.18 Tying It All Together: Smile! 69
vii
9. viii Contents
CHAPTER 3 Expressions and Interactivity 77
3.1 ThecinObject 77
3.2 Mathematical Expressions 84
3.3 Data Type Conversion and Type Casting 92
3.4 Overflow and Underflow 98
3.5
3.6
3.7
3.8
3.9
3.10
Named Constants 99
Multiple and Combined Assignment
Formatting Output 106
Working with Characters and Strings
More Mathematical Library Functions
Random Numbers 132
102
116
130
3.11 Focus on Debugging: Hand Tracing a Program 136
3.12 Green Fields Landscaping Case Study- Part 1 138
3.13 Tying It All Together: Word Game 141
CHAPTER 4 Making Decisions 155
4.1 Relational Operators 155
4.2 The if Statement 161
4.3 Theif/elseStatement 170
4.4 The if /else if Statement 175
4.5 Menu-Driven Programs 183
4.6 Nested i f Statements 185
4.7 Logical Operators 189
4.8 Validating User Input 198
4.9 More about Blocks and Scope 200
4.10 More about Characters and Strings 203
4.11 The Conditional Operator 209
4.12 The switch Statement 213
4.13 Enumerated Data Types 222
4.14 Focus on Testing and Debugging: Validating Output Results 225
4.15 Green Fields Landscaping Case Study- Part 2 227
4.16 Tying It All Together: Fortune Teller 232
CHAPTER 5 Looping 243
5.1 Introduction to Loops: The whi le Loop 243
5.2 Using the while Loop for Input Validation 250
5.3 The Increment and Decrement Operators 253
5.4 Counters 258
5.5 Keeping a Running Total 260
5.6 Sentinels 263
5.7 The do-while Loop 265
10. 5.8 The for Loop 271
5.9 Focus on Software Engineering: Deciding Which Loop to Use 277
5.10 Nested Loops 279
5.11 Breaking Out of a Loop 281
5.12 Using Files for Data Storage 285
5.13 Focus on Testing and Debugging: Creating Good Test Data 301
5.14 Central Mountain Credit Union Case Study 304
5.15 Tying It All Together: What a Colorful World 308
CHAPTER 6 Function s 323
6.1 Modular Programming 323
6.2 Defining and Calling Functions 324
6.3 Function Prototypes 332
6.4 Sending Data into a Function 333
6.5 Passing Data by Value 338
6.6 The return Statement 342
6.7 Returning a Value from a Function 343
6.8 Returning a Boolean Value 349
6.9 Using Functions in a Menu-Driven Program 351
6.10 Local and Global Variables 355
6.11 Static Local Variables 362
6.12 Default Arguments 364
6.13 Using Reference Variables as Parameters 368
6.14 Overloading Functions 378
6.15 The exit() Function 382
6.16 Stubs and Drivers 385
6.17 LittleLottoCaseStudy 387
6.18 Tying It All Together: Glowing Jack-o-lantern 392
CHAPTER 7 Introduction to Classes and Objects 407
7.1 Abstract Data Types 407
7.2 Object-Oriented Programming 409
7.3 Introduction to Classes 411
7.4 Creating and Using Objects 414
7.5 Defining Member Functions 416
7.6 Constructors 423
7.7 Destructors 429
7.8 Private Member Functions 432
7.9 Passing Objects to Functions 435
7.10 Object Composition 442
Contents ix
7.11 Focus on Software Engineering: Separating Class Specification, Implementation ,
and Client Code 446
11. x Contents
7.12 Structures 453
7.13 More about Enumerated Data Types 465
7.14 Home Software Company OOP Case Study 469
7.15 Introduction to Object-Oriented Analysis and
Design 476
7.16 Screen Contro l 486
7.17 Tying It All Together: Yoyo Animation 491
CHAPTER 8 Arrays 507
8.1 Arrays Hold Multiple Values 507
8.2 AccessingArray Elements 509
8.3 Inputting and Displaying Array Data 511
8.4 Array Initialization 518
8.5 The Range-Based for loop 525
8.6 Processing Array Contents 528
8.7 Using Parallel Arrays 539
8.8 The typede f Statement 543
8.9 Arrays as Function Arguments 543
8.10 Two-Dimensional Arrays 553
8.11 Arrays with Three or More Dimensions 560
8.12 Vectors 563
8.13 Arrays of Objects 575
8.14 National Commerce Bank Case Study 585
8.15 Tying It All Together: Rock, Paper, Scissors 587
CHAPTER 9 Searching, Sorting , and Algorithm Analysis 603
9.1 Introduction to Search Algorithms 603
9.2 Searching an Array of Objects 610
9.3 Introduction to Sorting Algorithms 613
9.4 Sorting an Array of Objects 621
9.5 Sorting and Searching Vectors 624
9.6 Introduction to Analysis of Algorithms 627
9.7 Case Studies 635
9.8 Tying It All Together: Secret Messages 635
CHAPTER 10 Pointers 645
10.1 Pointers and the Address Operator 645
10.2 Pointer Variables 647
10.3 The Relationship Between Arrays and
Pointers 651
12. 10.4 Pointer Arithmetic 655
10.5 Initializing Pointers 656
10.6 Comparing Pointers 659
10.7 Pointers as Function Parameters 661
10.8 Pointers to Constants and Constant Pointers 665
10.9 Focus on Software Engineering: Dynamic Memory
Allocation 670
10.10 Focus on Software Engineering: Returning Pointers from
Functions 674
10.11 Pointers to Class Objects and Structures 680
10.12 Focus on Software Engineering: Selecting Members
of Objects 684
10.13 Smart Pointers 686
10.14 Tying It All Together: Pardon Me, Do You Have the Time? 694
CHAPTER 11 More about Classesand Object -Oriented Programming 703
11.1 The th is Pointer and Constant Member Functions 703
11.2 Static Members 708
11.3 Friends of Classes 715
11.4 Memberwise Assignment 720
11.5 Copy Constructors 721
11.6 Operator Overloading 730
11.7 Rvalue References and Move Operations 751
11.8 Function Objects and Lambda Expressions 761
11.9 Type Conversion Operators 770
11.10 Convert Constructors 773
11.11 Aggregation and Composition 776
11.12 Inheritance 782
11.13 Protected Members and Class Access 787
11.14 Constructors, Destructors, and Inheritance 792
11.15 Overriding Base Class Functions 797
11.16 Tying It All Together: Putting Data on the World Wide Web 800
CHAPTER 12 More on C-Strings and the s t ring Class 815
12.1 C-Strings 815
12.2 Library Functions for Working with C-Strings 820
12.3 Conversions Between Numbers and Strings 829
12.4 Writing Your Own C-String Handling Functions 833
12.5 More about the C++ str i ng Class 839
12.6 Advanced Software Enterprises Case Study 842
12.7 Tying It All Together: Program Execution Environments 844
Contents xi
13. xii Contents
CHAPTER13 Advanced File and 1/ 0 Operations 853
13.1 Input and Output Streams 853
13.2 More Detailed Error Testing 861
13.3 Member Functions for Reading and Writing Files 865
13.4 Binary Files 877
13.5 Creating Records with Structures 881
13.6 Random -Access Files 886
13.7 Opening a File for Both Input and Output 893
13.8 Online Friendship Connections Case Study: Object Serialization 898
13.9 Tying It All Together: File Merging and Color-Coded HTML 903
CHAPTER14 Recursion 915
14.1 Introduction to Recursion 915
14.2 The Recursive Factorial Function 922
14.3 The Recursive gcd Function 924
14.4 Solving Recursively Defined Problems 925
14.5 A Recursive Binary Search Function 927
14.6 Focus on Problem Solving and Program Design: The QuickSort Algorithm 929
14.7 The Towersof Hanoi 933
14.8 Focus on Problem Solving: Exhaustive and Enumeration Algorithms 936
14.9 Focus on Software Engineering: Recursion versus Iteration 940
14.10 Tying It All Together: Infix and Prefix Expressions 941
CHAPTER15 Polymorphism and Virtual Functions 949
15.1 Type Compatibi lity in Inheritance Hierarchies 949
15.2 Polymorp hism and Virtual Member Functions 955
15.3 Abstract Base Classes and Pure Virtual Functions 963
15.4 Focus on Object-Oriented Programming : Composition versus Inheritance 969
15.5 Secure Encryption Systems, Inc., Case Study 973
15.6 Tying It All Together: Let's Move It 976
CHAPTER16 Exceptions, Templates, and the Standard Template Library
(STL) 987
16.1 Exceptions 987
16.2 Function Templates 999
16.3 Class Templates 1007
16.4 Class Templates and Inheritance 1012
16.5 Introduction to the Standard Template Library 1016
16.6 Tying It All Together: Word Transformers Game 1029
14. CHAPTER 17 Linked Lists 1037
17.1 Introduction to the Linked List ADT 1037
17.2 Linked List Operations 1043
17.3 A Linked List Template 1055
17.4 Recursive Linked List Operations 1059
17.5 Variations of the Linked List 1067
17.6 The STL list Container 1068
17.7 Reliable Software Systems, Inc., Case Study 1071
17.8 Tying It All Together: More on Graphics and Animation 1074
CHAPTER 18 Stacks and Queues 1085
18.1 Introduction to the Stack ADT 1085
18.2 Dynamic Stacks 1093
18.3 The STL stack Container 1097
18.4 Introduction to the Queue ADT 1099
18.5 Dynamic Queues 1106
18.6 The STL deque and queue Containers 1109
18.7
18.8
Focus on Problem Solving and Program Design: Eliminating Recursion
Tying It All Together: Converting Postfix Expressions to Infix 1117
CHAPTER 19 Binary Trees 1125
19.1 Definition and Applications of Binary Trees 1125
19.2 Binary Search Tree Operations 1129
19.3 Template Considerations for Binary Search Trees 1145
19.4 Tying It All Together: Genealogy Trees 1145
Appendix A: The ASCII Character Set 1155
Appendix B: Operator Precedence and Associativity 1159
Appendix C: Answers to Checkpoints 1161
Contents xiii
1112
Appendix D: Answers to Odd -Numbered Review Questions 1201
Index 1221
15. xi v Contents
Additional Appendices
The following append ices are located on the book's companion web site.
Appendix E: A Brief Introduction to Object -Oriented Programming
Appendix F: Using UMLin Class Design
Appendix G: Multi-Source File Programs
Appendix H: Multiple and Virtual Inheritance
Appendix I: Header File and Library Function Reference
Appendix J: Namespaces
Appendix K: C++ Casts and Run-Time Type Identification
Appendix L: Passing Command Line Arguments
Appendix M: Binary Numbers and Bitwise Operations
Appendix N: Introduction to Flowcharting
16. Welcome to Starting Out with C++:Early Objects, 9th Edition. This book is intended
for use in a two -term or three-term C++ programming sequence, or an accelerated
one-term course. Students new to programming, as well as those with prior course work
in other languages, will find this text beneficial. The fundamentals 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 programs
that are concise, practica l, 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.
What's New in the Ninth Edition
The New C++11 Standard
C++11 is the latest standard version of the C++ language. In previous years, while the
standard was being developed, it was known as C++Ox. In August 2011, it was
approved by the International Standards Organization (ISO), and the name of the
standard was officially changed to C++l l. Most of the popular C++ compilers now
support this standard.
The new C++11 standard was the primary motivat ion behind this edition, which
introduces many of the new language features. However, a C++11 compi ler is not
strictly required to use the book . As you progress through the book, you will see
C++ll 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 compi le using an
older compiler.
The C++11 Topics Introduced in This Edition
• The aut o key word is introduced in Chapter 2 as a way to simplify comp lex
variable definitions. This key word causes the compiler to infer a variable's data
type from its initialization value.
xv
17. xvi Preface
• Chapter 2 also introduces the new long long i nt and unsigned long long i nt
data types and the LL literal suffix.
• Chapter 5 shows how to pass a str i ng object directly to a file stream object's
open member function, without the need to call the c_st r () member function.
A discussion of the c_st r () function sti ll exists for anyone using a legacy
compiler.
• Th e range -based for loop is introduced in Chapter 7. Thi s new looping
mechanism automatically iterates over each element of an array, vector, or
other collection, without the need for a counter variable or a subscript.
• Chapter 7 also introduces strongly typed enums
.
• Chapter 8 introduces new ways to initialize variables and shows how a vect or
can now be initialized with an initialization list.
• Chapter 10 introduces smart pointers and provides examples of how and why to use
the new uni que_ptr and shared_ptr pointers for safely allocating and working
with dynamic memory.
• Chapter 10 also introduces the move assignment operator, and the null pt r key
word, which is now the standard way of representing a null pointer.
• Chapter 11 discusses move constructors, provides more in depth coverage of
move assignment operators, and introduces lambda expressions .
• Chapter 12 introduces new functions in the C++11 string library and discusses
the new overloaded to _stri ng functions for convert ing numeric values to stri ng
objects.
• Chapter 15 introduces and demonstrates the use of the new override key word
that helps prevent subtle overridin g errors and the new final key word that
prevents a virtua l member function from being overridden .
• Chapter 16 introduces the new C++11 functions begi n(c) and end (c) to specify
positions within a collection c where an operat ion should begin and end.
What Else is New
This book's pedagogy and clear writing style remain the same as in the previous edition.
However, in addition to updating the book to introduce the new C++l 1 standard,
many improvements have been made to make it even more student -friendly.
• Upd ated Material
Material has been updated throughout the book to reflect changes in technology
and in software development environments, as well as to improve clarity and
incorporate best practices in teaching introductory programming . As a result,
new graphics and new or redesigned figures have been added throughout the
book where appropriate and new or impr oved sample programs have been
included in a number of chapters .
• New Material
New materia l has been added on a number of topics. In addition to introducing
and using new C++11 features, this new edition includes new sections on literals,
random numbers, and enumerated data types, as well as improved materia l on
designing classes.
18. Preface xvii
• New Programming Challenges
New Programming Challenge problems have been added to every chapter.
• Reorganized Chapters
Several chapters have been redesigned to improve student learning . Chapter 5
(Looping) has been reorganized to give students more practice using the whi le
loop before introducing do-while and for loops. The Chapter 6 (Functions)
material on defining and calling functions has been reorganized to introduce
function prototypes earl ier and allow main to always be the first function in
a client program .
Organization of the Text
This text teaches C++ in a step-by-step fashion. Each chapte r 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, flexibility is provided .
The following dependency diagram (Figur e P-1) suggests possible sequences of
instruct ion.
Chapter 1 covers fundamental hardware, software, and programm ing concepts. The
instructor may choose to skip this chapter if the class has already mastered those topics.
Chapters 2 through 6 cover basic C++ syntax, data types, expressions, selection
structures, repetition structures, and functions . Each of these chapters builds on the
previous chapter and should be covered in the order presented.
Chapter 7 introduces object-oriented programming . It can be covered any time after
Chapter 6, but before Chapter 11. Instructors who prefer to introduce arrays before
classes can cover Chapter 8 before Chapter 7. In this case it is only necessary to
postpone Section 8.13 (Arrays of Objects) until Chapter 7 has been covered.
As Figure P-1 illustrates, in the second half of the book Chapters 11, 12, 13, and 14
can be covered in any order. Chapters 11, 15, and 16, however, should be done in
sequence. Instructors who wish to introduce data structures at an earlier point in the
course, without having first covered advanced C++ and OO P features, can cover
Chapter 17 (Linked Lists), followed by Chapters 18 and 19 (Stacks & Queues and
Binary Tr ees), any time after Chapter 14 (Recursion). In this case it is necessary to
simply omit the sections in Chapters 17- 19 that deal with templates and the Standard
Template Library.
19. xviii Preface
Figure P-1
Chapter1
Introduction
..
Chapters2-6
Basic
Language
Elements
I
• •
Chapter7 Chapter8
OOPIntroduc
tion Arrays
I
+ +
Chapter9
Chapter10
Search
ing, Sorting
,
Pointers
andAlgorithm
Analys
is
I
I
+ • + •
Chapter12 Chapter13
Chapter14
Chapter11
Advanced AdvancedFiles
Recursion
MoreOOP
Strings and1/0
• •
Chapter15 Chapter17
Adv.OOP LinkedLists
I
• + +
Chapter16
Chapter18
Chapter19
Except
ions,
Stacksand
BinaryTrees
Templates
,
Queues
andSTL
20. Preface xix
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 fundamentals of hardware , software, operating systems, programming, problem
solving, and software engineering . The components of programs, such as key words,
variables, operators, and punctuation are covered . The tools of the trade , such as
hierarchy charts and pseudocode, are also presented . The Tying It All Together
sect ion shows students how to use the cout statement to create a personalized
output message. Programm ing Challenges at the end of the chapter help students see
how the same basic input, processing , and output structure can be used to create
multiple programs .
Chapter 2: Introduction to C++
This chapter gets the student started in C++ by introducing the basic parts of a
C++ program , data types, the use of variables and literals, assignment statements,
simple arithmetic operations, program output, and comments . The C++ st ring
class is presented and string objects are used from this point on in the book as
the primary method of handling strings. Programm ing style conventions are
introduced , and good programming style is modeled here, as it is throughout the
text . The Tying It All Toget her section lets the student play with simple text -
based graphics.
Chapter 3: Expressions and Interactivity
In this chapter the student learns to write programs that input and handle numer ic,
character, and string data. The use of arithmet ic operators and the creation of
mathemat ical expressions are covered, with emphasis on operator precedence .
Debugging is introduced, with a section on hand tracing a program . Sections are also
included on using random numbers , on simple output formatting, on data type
conversion and type casting, and on using library functions that work with numbers.
The Tying It All Together section shows students how to create a simple interactive
word game.
Chapter 4: Making Decisions
Here the student learns about relational expressions and how to control the flow of a
program with if, if I else , and if I else i f statements . Logical operators, the
conditional operator, and the swi tch statement are also covered. Applications of these
constructs, such as menu-driven programs , are illustrated . This chapter also introduces
the concepts of blocks and scope and continues the theme of debugging with a section
on validating output results. The Tying It All Together section uses random numbers
and branching statements to create a fortune telling game.
26. This ebook is for the use of anyone anywhere in the United
States and most other parts of the world at no cost and with
almost no restrictions whatsoever. You may copy it, give it away
or re-use it under the terms of the Project Gutenberg License
included with this ebook or online at www.gutenberg.org. If you
are not located in the United States, you will have to check the
laws of the country where you are located before using this
eBook.
Title: The Essentials of Good Skirmishing
Author: George Gawler
Release date: September 4, 2018 [eBook #57848]
Language: English
Credits: Produced by Brian Coe, David King, and the Online
Distributed Proofreading Team at http://www.pgdp.net
(This
file was produced from images generously made
available
by The Internet Archive.)
*** START OF THE PROJECT GUTENBERG EBOOK THE ESSENTIALS
OF GOOD SKIRMISHING ***
29. THE ESSENTIALS OF GOOD SKIRMISHING
THE ESSENTIALS OF GOOD
SKIRMISHING:
SECOND EDITION.
TO WHICH ARE NOW ADDED,
A BRIEF SYSTEM OF
COMMON LIGHT INFANTRY DRILL;
A METHOD OF PRACTICE FOR
THE SPEEDY ACQUIREMENT OF PROFICIENCY
IN THE USE OF THE RIFLE;
AND SHORT OBSERVATIONS ON SERVICEABLE APPOINTMENTS
AND DRESS.
BY
COLONEL G. GAWLER, K.H.
Late of the 52nd Light Infantry.
LONDON:
PARKER, FURNIVALL, AND PARKER,
MILITARY LIBRARY, WHITEHALL.
1852
30. LONDON:
SAVILL AND EDWARDS, PRINTERS,
CHANDOS STREET.
TO
SIR JOHN MACDONALD, K.C.B.
ADJUTANT-GENERAL TO THE FORCES,
THE FOLLOWING REMARKS,
IN REFERENCE TO ONE OF THE BRANCHES OF THE SERVICE
COMMITTED TO HIS ESPECIAL SUPERINTENDENCE,
ARE, BY PERMISSION,
MOST RESPECTFULLY DEDICATED,
BY HIS VERY OBEDIENT
AND FAITHFUL SERVANT,
THE AUTHOR.
August, 1837.
31. CONTENTS.
I. The Essentials of Good
Skirmishing
13
II. A system of Common Light
Infantry Drill, adapted to the
Long Range Rifle
35
III. A Method of Practice for
the Speedy Acquirement of
Proficiency in the Use of the
Rifle
51
IV. Short Observations on
Dress and Appointments
59
32. PREFACE TO THE SECOND EDITION.
Under the immense increase which is now taking place in the length
of range and accuracy in effect of small arms, there must, of
necessity, come an increase of the importance of skill in skirmishing.
The reconnoissances of mounted staff officers, the patrolling,
skirmishing, and menacing of charges by small bodies of cavalry, and
even the action of artillery on that very large proportion of the
surface of the earth in which vision is limited to at most one
thousand yards, will be greatly controlled by the accurate and
distant infantry marksman. Nay, even columns and lines of infantry
will now only be able to repel his power of destructive annoyance by
meeting him with troops in extended order. Of old, if he pressed too
near to a closed body of infantry, an impatient volley might sweep
him and his comrades into annihilation, but now, ensconced in his
distant cover, he may “beard the lion in his den,” a battalion of
infantry in position, with something like impunity.
With this distant power of the individual skirmisher, however, there
stand connected increased difficulties of combination with his
surrounding and supporting comrades. Such general unity of action
is most important at times for reasonable security, and always for
the production of general and total effects.
These advantages must depend, more than ever, upon well-
impressed individual acquaintance with the essential principles of
good skirmishing.
Under these considerations the following pages, which were received
at the time of their first publication with public[1]
and private
testimonials of approbation, are reprinted, with some corrections
33. and additions to make them suitable to the present standard of
military efficiency, and with remarks which may be useful, at this
period, upon light infantry drill, rifle practice, dress, and
appointments.
February, 1852.
34. PREFACE TO THE FIRST EDITION.
Some high continental military authorities have of late years
proclaimed that British soldiers are incapable, or next to incapable,
of acting as light infantry. Than this announcement there never was
a clearer illustration of the golden maxim, “Assertions are not
proofs.” If our censors had taken the trouble to search for evidence,
southern and western Europe would have told them, that in these
portions of the civilized world there have not been known, in the
middle and modern ages, light troops superior to those of Britain. In
archers, the light infantry of “the olden time,” by what nation in the
world was England surpassed? Her troops of this class, the direct
forefathers of a large proportion of our present soldiery, gained for
themselves a name that might, one would think, have sounded even
to the shores of the Baltic, which at least has rung upon every ear
familiar with the tales of Poictiers, Cressy, and Agincourt. All of
these, as described by foreign pens,[2]
were won mainly by the skill
and conduct of the British bowmen. At Cressy 12,000 Genoese, then
the most renowned light troops of continental Europe, were driven
like chaff before unerring cloth-yard shafts from the tough old
English yew.[3]
Had our critics inquired concerning more modern warfare, their
Hessian neighbours would have told them that in the North
American revolutionary contest, in that six years’ war of surprises,
skirmishes, and ambuscades, among unequalled woods and
wildernesses, the British soldier in himself was more than a match
for the skirmisher-bred American woodsman; and, to say the least,
35. as alert and intelligent at the outposts as his well-trained German
fellow-combatants. The struggle, indeed, ended unsuccessfully to
Britain; but, let the blame rest where it may, it cannot be thrown
upon the British soldier; he never came short of his duty.
In the protracted and astonishing conquest of Hindoostan, which
had some European inimical spectators, the flank companies of
battalions did three-fourths of the work; not only concentrated at
the breach and escalade, but also, when necessity required it,
extended in the jungle.
And to come to those contests which offer the fairest estimate of the
British soldier as he now is, and with which all civilized military critics
may be expected to have become acquainted, the European
campaigns of the Duke of Wellington; it is not sounding an empty
boast, but a note of most sober and honest truth to say, that, than
the British light troops of his army, better never guarded a camp or
fought in a skirmish. In a fluctuating war of eight campaigns, over
many hundred miles of varying country, opposed to the bravest and
most intelligent soldiers of the continent, none were ever more
constantly conquerors in action or more successfully vigilant on
outpost duty.
It is true, indeed, that the British light infantry man has a practical
system in some important particulars peculiar to himself; and in
none more so than that, under all circumstances, he continues the
well-disciplined soldier, never systematically assuming the character
of the loose, lawless, free-corps freebooter. From this last peculiarity
may have arisen the incorrect impressions of our foreign
contemporaries. We, however, glory in the difference, and affirm that
stern discipline and high soldier-like principle must form the basis of
thorough military efficiency to the full as much in the light and
extended services, as in those of a more concentrated description.
Free corps originate in long internal wars. Happily for Britain, she of
late has not been distinguished for such nurseries of irregular
military skill; but when her territories were desolated by them, there
36. were not wanting bodies of this description as active, intelligent, and
enterprising as any that ever graced the continent of Europe.
To assist in keeping up the remembrance of the essentials of the
practical system of the modern British light infantry man, in that
important branch of his duty, skirmishing; in order that foreigners,
whatever be their theories, may continue to receive, when necessity
requires it, practical evidence that British soldiers can act as light
infantry, is the principal object of the Author in submitting to the
army the following observations.
1837.
37. THE ESSENTIALS OF GOOD SKIRMISHING.
Skirmishing is the art of fighting, with numbers insufficient to
occupy, in close order, the ground contested.
In light infantry or skirmishing drill, as in all other instruction, the
principal art is, to dwell forcibly on things really essential;
moderately on things merely important; and lightly on things nearly
indifferent.
To good skirmishing there are eight essentials:—
1. Active Intelligence.
2. Correct Firing.
3. Daring Courage.
4. Making the best of Cover.
5. Presenting the smallest possible Marks to the Enemy’s Fire.
6. Maintaining Extension from, and Dependence on, a given File
of Direction.
7. Preserving a sufficient Readiness to resist Cavalry.
8. A judicious Employment of Supports and Reserves.
Very deficient in any of these qualifications, skirmishers cannot be of
the first order. Possessing them all in reasonable proficiency,
38. skirmishers must be very good, let the character of their other
attainments and systems of drill be whatever it may.
39. I.
The life and especial mark of the good skirmisher is Active
Intelligence.
In the ranks, the closer men attain to a state of unreflecting
mechanism, with nothing of mind but attention, the nearer they are
to true soldier-like perfection. Not a thought should arise, an eye-ball
turn, or a finger tremble, but in obedience, and that obedience
should be accurate and instantaneous as the word. Not so the
skirmisher; within certain limits he is his own general, and must
think for himself. From the moment that he “shakes out” from the
elbows of his right and left comrades, reflection must awake, and, in
due dependence on a broad established system, be energetically
directed to gain every advantage on the opposing foe.
The French as skirmishers excel in active intelligence. Every man
manœuvres as if the fate of the day depended upon his conceptions.
Their ability, in this particular, may spring in a great degree from the
looseness of their instruction practice of all field exercise. This, while
it is ill calculated to make steady soldiers at close order, is well
adapted to give free scope to the natural intelligence of skirmishers.
The mechanical stiffness, formerly much seen in British light infantry,
arose, there can scarcely be a question, from the formality of our old
ordinary mode of applying the system of light infantry drill. The
automatonism, proper to the ranks, was extended to skirmishers,
and they also were taught to move only as they were wound up. The
indignation of the drill instructor was poured out, not upon men who
failed in the first-rate essentials of good skirmishing, but upon those
who erred a foot in dressing or in distance—who did not step off,
halt, or fire, precisely at the sound of the whistle or elevation of the
signal fire-lock—whose unmusical ears refused to distinguish amid
the endless variety of bugled orders—who could not run like racers,
or who ran bewildered in some of the intricate evolutions, which
40. were supposed to crown the very pinnacle of skirmishing perfection.
Some corps did not drill according to this erroneous method, others
did not carry it to its full extent; but, taking the army as a whole,
unreflecting precision in the details of skirmishing was its system,
and to this day that system has its votaries.
It is no small proof of the strength of natural intelligence in British
soldiers, that, when brought into actual service, they broke through
the fettered stiffness of their instruction drill, let go what was
indifferent in it, clung to that which was important, and soon rivalled
their intelligent and experienced opponents.
The true summit of perfection in skirmishing is, the preservation of
order in disorder and of system in confusion; for the circumstances
which accompany skirmishes of necessity produce, almost always,
more or less mixture, inversion, and general irregularity. In hot
contests over large extents of intricate ground, men of different
companies regiments, brigades, and even divisions, mingle with each
other. Soldiers should therefore be drilled, not indeed to fall into
such irregularities on principle, but to be ready for them in practice.
They should be made at times to skirmish in inverted companies,
mixed companies, and mixed regiments—to form good skirmishing
lines out of confused masses—to concentrate from similar mixed
bodies into squares to resist cavalry, or into lines or columns for the
purposes of charging or defending streets of villages, or other defiles
—to extend again rapidly, and to perform every necessary evolution
as if no mixture or irregularity had occurred.
Such movements, when inculcated as necessary exceptions to good
order, do not unfit soldiers for more regular manœuvres; but, by the
contrast, increase order and intelligence in them.
Soldiers who have not been drilled on this principle, or who have not
acquired it by experience, are, when extended under fire, continually
liable to be transformed into unmanageable mobs. Skirmishers who
understand it, will always show a formidable front, be ready for
every changing event, and, under the worst possible circumstances,
act together in the mighty energy of mutual confidence.
41. Unreflecting mechanical precision is at direct variance with such
practice, active intelligence and a wise well-defined general system
are its component elements. Active intelligence, therefore, in every
point of view, is invaluable to the skirmisher; and the attention of all
drill superintendents and instructors should be unremittingly directed
to stamp it on his mind and to mix it with his practice.
42. II.
The soldier at close order always has, or should have, a large mark
for his fire. Nothing can be more unsteady or unsoldierlike than for a
closed body to pour a volley upon mere skirmishers: from troops
concentrated, no object but an opposing mass or line within 200
yards should provoke a single shot.[4]
The skirmisher has not this
advantage, his mark is generally small and often indistinct; besides
which, the temptation to careless aim is much greater to him, who
fires away sixty or one hundred and twenty rounds over hedge and
ditch without intermission, than to the battalion soldier, who seldom
expends more than twenty at any one time. Hence the peculiar
necessity for practising light troops to cool steady aim and accurate
firing.
The immense importance of very great attention to the ball
practice[5]
of this branch of the service, is too obvious to require an
enforcing observation; but it ought to be impressively remarked, that
good practical aim is not to be acquired only in front of the target,
but to the full as much in the every day drill firings, with or without
blank cartridge.
It is not the case that careful firing is provoked by the sight of an
enemy; on the contrary, arithmetical calculation has repeatedly
proved, to the blush of the good soldier, that under no circumstances
are balls so wildly and carelessly thrown away as in those moments
when the fortunes of empires are thrown away along with them. In
action, the greater number of the musquets are pointed generally at
masses of dust and smoke, and not precisely at the dark active
figures which they envelop.
For these reasons, on the drill field, instead of the loose careless
practice too common in this particular, the soldier, and especially the
skirmisher, should be unsparingly compelled to go through the
motions of aiming and firing at a precise object, as accurately as if at
43. actual ball practice, until the habit be engraven too deep on his mind
to be obliterated by any circumstances of confusion.
44. III.
Daring courage, as an acknowledged essential to the thorough
soldier of every class, it would scarcely have been necessary to have
noticed in the present enumeration, did not an opinion appear to
obtain, much on the continent and with some in Great Britain, that
light troops are required to exercise it in a less desperate degree
than men at close order.
Foreigners, when extended, often spend systematically much time in
long shots and shy fighting, and give way, as a matter of course,
before troops in weightier formations. In the British service this
opinion does not prevail; there is no good reason why it should, and
it is of great importance to the thorough efficiency of skirmishers
that it should not.
The British soldier is as much a grenadier at heart, with a green tuft
in his cap skirmishing through a wood, with no close support but his
tried and trusty rear-rank man, as he is in designation, when
mounting a breach, under a black bear-skin, with ten thousand
bayonets at his back.
In extended order he is just as ready, as at any other time, to fix his
bayonet and dash to close quarters, if the enemy, on tolerably equal
terms, will stand for him; and if his piquet be pressed by a heavy
attacking column, he sees no more reason than at any other time, to
surrender an inch of ground, as long as he can stand upon it. Very
remarkable instances of this kind occurred during the Peninsular war.
[6]
It is well that it should be so; for if it be indeed true, as some
insinuate, that the British soldier falls somewhat below his
continental brethren in the policy of skirmishing, this important
essential, persevering unflinching courage, will ever, as it always has
45. done, make up for minor deficiencies, and carry him triumphantly
through.
It is useful to observe, how much the flinching practice of foreign
light infantry has influenced, and perhaps been influenced by, their
systems of drill. The old method, which we borrowed from them, of
firing advancing by alternate ranks or files, may be practicable with
long shots and cautious movements, but is only partially applicable
to the service practice of British light infantry, who, even when close
to their enemy, count it most unsoldier-like to fire without an
immediately important purpose in view; who seldom fire at all until
within two hundred yards of their object;[7]
and who, after a few
quiet shots to get within the length of their breath and to draw on
the enemy’s fire, dash at the opposing line of defence with that
peculiar rush which may be called “the skirmishers’ charge.”[8]
The present established mode of advancing firing by “single line,” is
that into which daring skirmishers always do, and of necessity
always must, fall. On the drill ground, when required, this mode may
be completed to a perfect copy of “the skirmishers’ charge,” by the
sound “double quick” at about eighty yards from the supposed
enemy’s line of defence. The whole then, still partially firing, dash on
at an accelerated pace, until, the cover gained, “the halt” is
sounded, to take breath behind it, and prepare for another forward
effort.
46. IV.
Conduct which in some cases, under fire, is disgraceful, in others is
meritorious. The man in the ranks who shrinks away from a shell or
cannon ball, or who goes out of his commanded course to cover
himself from musquetry, has little claim to the name of a brave
soldier; while he who in a trench or battery does not bow low at the
cry “shot,” or fall prostrate before a blazing shell, or who in a
skirmish neglects to make the best of every foot of cover, has no
right, to the title of a wise one.
The difference arises from the line of military perfection being
struck, not according to what will suit or save the individual, but by
that which will benefit the general service.
Between the duties peculiar to compact fighting and skirmishing, the
distinction should be drawn broad and deep on the drill field;
because on the battle field, it is natural on either side to be forgetful.
There are two kinds of cover—ball proof cover, and mere concealing
cover. Ragged rocks, large trees, brick and stone walls and buildings,
stout fences and thick mud-banks, constitute generally the first
class; young plantations, gorse and underwood, hedges, abattis,
slight fences and narrow sand hills, the second.
It is for the first that the eye of the good skirmisher continually
seeks. The second, after fire completely opens, turned even to best
advantage, is worth but little more than no cover at all; and is worse
than no cover at all, if the men, which they are much disposed to
do, collect in groups behind it.
In this way, that very frequent out-lying piquet defence, abattis
across roads, is often more injurious to friends than to foes. Instead
of being planted, as an obstacle to the enemy, 100 yards in front of
47. the intended line of defence, it is but too commonly placed on that
line, and when the struggle comes, is thickly occupied as a sort of
rampart. On such striking objects the enemy’s fire concentrates,
every ball goes through, and the loss behind is severe.
Skirmishers must not only seek for cover, but make the best of it.
Good cover loses half its advantages if stupidly occupied, and
ingenuity will often make bad cover ball-proof.
However, notwithstanding all that may be said in favour of “making
the best of cover,” it must be thoroughly remembered, that this duty,
at the moment of a close attack, is altogether secondary to those of
courage and activity.
When it comes to short distances, the quicker the affair is settled the
less will be the loss of the assailants; and the more daring the front
exhibited, the greater the probabilities of success.
At every change of situation supports should, if possible, be placed
under cover by their commanders; if exposed, as large bodies they
form most inviting marks to the enemy’s long shots. This precaution,
when opportunities offer, should not be forgotten on the drill field.[9]
48. V.
One man at 200 yards[10]
is a very small mark. Two abreast together,
a tolerably good one; three abreast together should almost always
be hit, and four never be missed. Our opponents, therefore, in
skirmishing, cannot serve us better than by grouping together; and
that which we would wish them to do, we ourselves must carefully
avoid. Skirmishers should move in single files,[11]
except in thick
“concealing cover,” when two or three together may, without
exposure, increase mutual confidence; or behind patches of “ball-
proof cover,” on which small groups may concentrate as to
temporary breast-works; in either case extending again at once
when good cover ceases. Even in single files, men loading should
incessantly cover with precision their file leaders, so as to offer
marks of but one in front.
In skirmishing, more than in any other branch of warfare, men may
be uselessly thrown away; and therefore in this, more than in any
other, economy of life and limb should form a paramount object of
attention.
On British soldiers also, perhaps more than on any others, it is
important to impress these observances; for there is in them such a
peculiarly strong national perception of that great military maxim,
“concentration is strength,” that overlooking its exceptions, they are
always powerfully impelled the hotter the fire to group the closer
together.
Nothing but deeply impressed instruction, or dearly bought
experience, can break in them the bonds of a propensity so
thoroughly at variance with good skirmishing.
49. VI.
In all systems of movement composed of many distinct bodies, there
must be a common centre of direction, connexion and extension, or
unity of purpose and effect must cease, and confusion, dispersion or
concentration ensue. Such a centre there is in the minutely regular
mighty moving system of the universe; and from it, down through
every degree of importance, to that in the more mob-like progress of
a swarm of bees.
Perhaps the greatest defect in modern skirmishing is, that, in
extensive affairs, this principle of an established point of direction is
not well maintained. However much it may be recognised in mere
theory, it is not, in instruction, explained in sufficient fulness, or
required with sufficient rigour; and from these neglects arise, in a
great degree, the inversions, mixtures, and other irregularities in
actual service before noticed.
It is most injudicious to encumber the minds of men and officers
with a multitude of intricate or non-essential recollections; but the
principle in point involves nothing of this character; it is at the same
time very simple and highly essential.
For all skirmishers of the same battalion acting together, until they
become thoroughly mixed with other corps—in all cases of
movement, excepting only those of changes of front on the principle
of the wheel on the fixed pivot, and those of taking ground to a
flank obliquely or directly; the centre, or right centre file[12]
of their
own battalion skirmishers is THE POINT OF DIRECTION, unless at the time
OTHERWISE ESPECIALLY ORDERED.
50. When detachments from several battalions skirmish together, the
battalion of direction for the line in rear, is that of direction for the
skirmishers in front, unless at the time otherwise ordered. If no such
battalion has been pointed out, the officer commanding the
extended line names to the officers in command of detachments the
battalion skirmishers of direction, and takes care to keep these last
to their true course and object.
Every officer in command of the skirmishers of a battalion has the
option, in responsible dependence on the maintenance of the
general alignement and proper communication, of changing his point
of direction, by order at and for the time being, to the flank file
nearest to the battalion skirmishers of direction, or otherwise as
circumstances may appear to require.
In all changes of front on the principle of the wheel on a fixed pivot,
that pivot is, of necessity, during the evolution, the file of direction.
In taking ground to a flank obliquely or directly, the leading file
always becomes, during this movement, and no longer, unless
especially ordered at the time, the file of direction.
When skirmishers become mixed and unmanageable, and there is
neither time nor opportunity for re-forming them at close order on
their covering serjeants, the officer in command fixes upon any man
as a point of direction, the others instantly extend away right and
left (unless at the time especially ordered to extend to either flank in
particular), without regard to their original proper places—double
into files—take up the general alignment—officers and non-
commissioned officers with alertness take charge of proper portions,
51. and the whole move and act upon this new centre, as if no inversion
or mixture had occurred.
Upon such simple rules, well impressed and strictly maintained, any
number of skirmishers may fight over large extents of the most
intricate ground, perfectly in hand and without confusion. Or, should
extraordinary events produce irregularity, officers in command may
easily, in an instant, under the worst circumstances, restore good
fighting order, until leisure permits a more regular formation.
In extensive skirmishes, the eyes and feelings of men retiring are
powerfully drawn towards the most apparently important points of
defence; and upon these, without direct orders, they more or less
concentrate. Assailants follow the same impulse, and direct their
force principally against these identical strongly occupied points.
Hence follow of necessity on both sides a massing into large marks
for the fire of opposing musquetry, sometimes even of artillery—
great unnecessary bloodshed in violent struggles, and a neglect on
the defensive side of ground which ought to be occupied, and on the
assailing side of points which ought to be attacked. Nothing but
keeping men in hand by the principle of well understood and well
maintained centres of direction can prevent similar evils.
Supports, in their movements, should be guided by the same general
principle as skirmishers—that is, the centre or right centre support of
each battalion should be, unless otherwise ordered, the support of
direction, except in the cases of wheeling on a fixed pivot, or of
taking ground to a flank. In the first exception, all conform to the
pivot, and in the last to the leading division, unless at the time
otherwise ordered. Supports, not belonging to the battalion of
direction, except in the two cases just noticed, conform under the
orders of their senior officer to the movements of those which do
52. 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