100% found this document useful (5 votes)
20 views

C Cookbook How to write great code with the latest C releases 1st Edition Wayne Murphy 2024 scribd download

The document provides information on the 'C Cookbook' by Wayne Murphy, which is designed to help programmers write effective code using the latest C++ features. It includes links to download the book and other related ebooks, as well as a detailed table of contents outlining various chapters that cover new concepts, language features, and best practices in C++. The author, with extensive experience in software development, aims to guide readers through modern programming techniques and improvements.

Uploaded by

cumbreelkana14
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (5 votes)
20 views

C Cookbook How to write great code with the latest C releases 1st Edition Wayne Murphy 2024 scribd download

The document provides information on the 'C Cookbook' by Wayne Murphy, which is designed to help programmers write effective code using the latest C++ features. It includes links to download the book and other related ebooks, as well as a detailed table of contents outlining various chapters that cover new concepts, language features, and best practices in C++. The author, with extensive experience in software development, aims to guide readers through modern programming techniques and improvements.

Uploaded by

cumbreelkana14
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 67

Visit https://ebookfinal.

com to download the full version and


explore more ebooks

C Cookbook How to write great code with the


latest C releases 1st Edition Wayne Murphy

_____ Click the link below to download _____


https://ebookfinal.com/download/c-cookbook-how-to-
write-great-code-with-the-latest-c-releases-1st-
edition-wayne-murphy/

Explore and download more ebooks at ebookfinal.com


Here are some suggested products you might be interested in.
Click the link to download

SQL and relational theory how to write accurate SQL code


3ed. Edition Date

https://ebookfinal.com/download/sql-and-relational-theory-how-to-
write-accurate-sql-code-3ed-edition-date/

Books That Teach Kids to Write 1st Edition Marianne C.


Saccardi

https://ebookfinal.com/download/books-that-teach-kids-to-write-1st-
edition-marianne-c-saccardi/

Philosophy of Law The Fundamentals 1st Edition Mark C.


Murphy

https://ebookfinal.com/download/philosophy-of-law-the-
fundamentals-1st-edition-mark-c-murphy/

Homalopsid Snakes Evolution in the Mud 1st Edition John C.


Murphy

https://ebookfinal.com/download/homalopsid-snakes-evolution-in-the-
mud-1st-edition-john-c-murphy/
Modern C programming with test driven development code
better sleep better 1st Edition Jeff Langr

https://ebookfinal.com/download/modern-c-programming-with-test-driven-
development-code-better-sleep-better-1st-edition-jeff-langr/

Energy management handbook 5th ed Edition Wayne C. Turner

https://ebookfinal.com/download/energy-management-handbook-5th-ed-
edition-wayne-c-turner/

Learn to Program with C 1st Edition Smiley

https://ebookfinal.com/download/learn-to-program-with-c-1st-edition-
smiley/

C How to Program 1ST Edition Harvey M. Deitel

https://ebookfinal.com/download/c-how-to-program-1st-edition-harvey-m-
deitel/

The Craft of Research Third Edition Chicago Guides to


Writing Editing and Publishing Wayne C. Booth

https://ebookfinal.com/download/the-craft-of-research-third-edition-
chicago-guides-to-writing-editing-and-publishing-wayne-c-booth/
C Cookbook How to write great code with the latest C
releases 1st Edition Wayne Murphy Digital Instant
Download
Author(s): Wayne Murphy
ISBN(s): 9789355515377, 9355515375
Edition: 1st
File Details: PDF, 16.09 MB
Year: 2024
Language: english
C++
Cookbook

How to write great code with the latest C++ releases

Wayne Murphy

www.bpbonline.com
First Edition 2024

Copyright © BPB Publications, India

ISBN: 978-93-55515-377

All Rights No part of this publication may be reproduced, distributed or


transmitted in any form or by any means or stored in a database or
retrieval system, without the prior written permission of the publisher with
the exception to the program listings which may be entered, stored and
executed in a computer system, but they can not be reproduced by the
means of publication, photocopy, recording, or by any electronic and
mechanical means.

LIMITS OF LIABILITY AND DISCLAIMER OF WARRANTY

The information contained in this book is true to correct and the best of
author’s and publisher’s knowledge. The author has made every effort to
ensure the accuracy of these publications, but publisher cannot be held
responsible for any loss or damage arising from any information in this
book.

All trademarks referred to in the book are acknowledged as properties of


their respective owners but BPB Publications cannot guarantee the
accuracy of this information.
www.bpbonline.com
Dedicated to

My family and friends


who have supported me,
during this book, and for everything else.

and

My managers at work that believed in me


ever since I first started working in software,
and those along the way.
Thanks et al.
About the Author

Wayne Murphy grew up in Brampton, Ontario, Canada. Graduating from


Sheridan College in town. He started work at his first programming job in
1987, and over the years been at many companies, in several different
roles, with various technologies. For most of the past 20 years, Wayne has
been consulting in his company, Great Leap Forwards Inc. When Wayne is
not at work, he is working on some of his own code, and spending time
with his family.
About the Reviewers

Maxim Chetruşca is a Software Engineer with almost a decade of


professional experience in C++. Throughout his career, he focused on
real-time, latency sensitive systems. During his work, he used C++ for the
backend of the busiest websites, distributed databases as well as squeezing
microseconds from high frequency trading systems. A firm believer of
C++ philosophy, he had the chance to use the language versions ranging
from 03 to 20 in production, running the code on 4 different platforms.
Outside of working hours he spends time learning about new car models
with his 2-year-old son.

Kris Jusiak is a passionate Software Engineer with experience across


various industries, including telecommunications, gaming, and most
recently, finance. He specializes in modern C++ development, with a keen
focus on performance and quality. Kris is also an active conference
speaker and open-source enthusiast, having created multiple open-source
libraries.

Chetan Sachdeva is a Tech Enthusiast, with over 13 years of expertise in


C++ and Python in software development. With a dynamic career
spanning Automotive, AR/VR, IoT, Android native development,
Typography, and Printing RIP. His true passion lies in solving complex
problems with data structures and algorithms. His entrepreneurial spirit
has led to the successful design of software and products for startups.
Beyond his professional endeavors, Chetan is an avid reader of non-fiction
and IT-related books, staying at the forefront of industry trends.
Acknowledgement

I remember that warm summer day in the mid-1970s, when my father’s


father told me You should get into and me not knowing what one was. I
remember my dad taking me into his work, because they just got their first
computer there. I later recall when my parents got us our first family
computer, I thought to myself, I will never be bored I have to thank them
for that, because I have not been bored yet.

I am very grateful to all those publishing material (books, web-pages,


videos) in the goal of wanting people to learn what they know. I hope I
have done your efforts justice.

My gratitude also goes to the team at BPB Publications, for giving me a


chance to do this.
Preface

C++ Cookbook walks you through all the recent new features. In a
cookbook-type style that talks about each new class or function, it shows
you in simple terms how to use it. Authored by a software professional,
with over 3 decades of experience, their passion for coding shows in the
book. This book takes the reader on a tour of what they will need to know
to be up to date with the latest C++ abilities.

The book outlines new features, with lots of code examples. They can use
it as a reference guide, or progress through each how-to recipe to
maximize their knowledge. Sometimes it will give suggestions on the best
approach, but mainly wants to inform you of options, and lets you take the
right path for your individual situation. The book should help those that
have not kept up to date with recent C++ releases. Whether your company
was sticking to an older standard, or you are starting with a new product.
There are a lot of great new features available, and this book will help you
working with the latest and greatest functionality. You can walk through
all the chapters with their code examples, or use it as a quick-reference
guide for something specific.

After reading it, you will be up to date and will make you and your project
work better.

Chapter 1: Working with Concepts – It defines what a concept is, how to


use one, and how to create your own. It discusses the different styles how
concepts are defined; whether creating a single constraint on a variable or
a function, making a requires clause, or combining concepts to make a
conjunction or compound requirement.

Chapter 2: Using the New Core Language Concepts – The chapter


initiates a long journey to learn what existing concepts are included in
C++. There are concepts for comparison, assignment, checking on the
type, and hierarchy.

Chapter 3: Using the New Comparison Concepts – The chapter continues


delving into predefined concepts. We look at those relating to equality, and
comparison.

Chapter 4: Using the New Iterator Concepts – Our next step into concepts
looks at all of the concepts defined for iterators, and also talks about the
progression of functionality with types of iterators. We also touch on some
other concepts relating to moving or copying values.

Chapter 5: Using the New Object Concepts – We pick up where we left


off, talking about concepts relating to the constraints of moving or
copying values. We also discuss the similarities and differences between
the concepts semiregular and regular.

Chapter 6: Using the New Callable Concepts – We will talk about


concepts relating functions, or other mechanisms that we can call to
execute some code.

Chapter 7: Const Related Specifiers – With this chapter, we end our


lengthy talk about concepts and discuss specifiers relating to defining
what is constant. We go over previously existing specifiers, and talk about
newer ones that will help your code be more efficient.

Chapter 8: Concurrent Processing – The chapter discusses threads,


callbacks, and different ways for your code to be executed safely by
different threads at the same time.

Chapter 9: Coroutines – The chapter presents a new mechanism for


executing code. We get into the details of the parts of a coroutine, how to
create them, and how to use them.

Chapter 10: Organizing Your Code with Modules – The chapter covers a
great new addition to the language. Modules will help you organize your
code easier. We get into the details of its components and go through how
to using other modules, and learn how to write our own code.

Chapter 11: Introduction to Ranges and Views – The chapter starts


discussion about what ranges, views, and spans are. The differences
between them, and how to use them are discussed. Since ranges relate to
concepts, we will talk about some of the existing range concepts.

Chapter 12: Range Access and Non-Modifying Sequence Functions for


Ranges – The chapter continues to discuss ranges, and some of the
functionality relating to subranges, sizes, iterating, and comparing.

Chapter 13: Range Algorithms: Sort, Search and More – The next leg of
our journey talks about ranges deals with searching and sorting. We can
perform functions on a range to get a value, or even a new range by doing
a permutation.
Chapter 14: Range Algorithms: Memory and Modification Functions – We
focus on memory; moving values around, and doing transformations.

Chapter 15: Views and Range Adaptors – The chapter talks about the
many functions that exist so we can get values in a view by calling a range
with an adaptor.

Chapter 16: Range Factories and Utilities – We conclude our talk about
ranges by showing some exiting new functionality. We can create an
infinite view of values, whether by using a simple function or a generator.
There is code showing how to even format your range for output.

Chapter 17: New Features for Containers – The chapter covers a lot of
ground, dealing with new container types, and simple new functions.

Chapter 18: Making it Easier to Code – There are a number of new


features discussed that you will be happy to see such as easier output, new
enhancements for strings and ranges, plus an easier way to use enums and
bits. There is also new types for dates, times and time zones.

Chapter 19: Making Your Code Cleaner – The chapter covers many recent
features for lambdas, new suffixes, optional and expected arguments, plus
new preprocessor directives for cleaner code.

Chapter 20: Making Your Code Safer – The chapter touches on some
important new features to make code less fragile.
Chapter 21: Making Your Code Faster and Easier to Debug – We conclude
by talking about ways to make your code run faster; including some new
functions, and new attributes. We also talk about new types that could help
you debug your code.
Code Bundle and Coloured Images

Please follow the link to download the

Code Bundle and the Coloured Images of the book:

https://rebrand.ly/de3g86d

The code bundle for the book is also hosted on GitHub at In case there’s
an update to the code, it will be updated on the existing GitHub repository.

We have code bundles from our rich catalogue of books and videos
available at Check them out!

Errata

We take immense pride in our work at BPB Publications and follow best
practices to ensure the accuracy of our content to provide with an
indulging reading experience to our subscribers. Our readers are our
mirrors, and we use their inputs to reflect and improve upon human errors,
if any, that may have occurred during the publishing processes involved.
To let us maintain the quality and help us reach out to any readers who
might be having difficulties due to any unforeseen errors, please write to
us at :

[email protected]
Your support, suggestions and feedbacks are highly appreciated by the
BPB Publications’ Family.

Did you know that BPB offers eBook versions of every book published,
with PDF and ePub files available? You can upgrade to the eBook version
at www.bpbonline.com and as a print book customer, you are entitled to a
discount on the eBook copy. Get in touch with us at :

[email protected] for more details.

At you can also read a collection of free technical articles, sign up for a
range of free newsletters, and receive exclusive discounts and offers on
BPB books and eBooks.

Piracy

If you come across any illegal copies of our works in any form on the
internet, we would be grateful if you would provide us with the location
address or website name. Please contact us at [email protected]
with a link to the material.

If you are interested in becoming an author

If there is a topic that you have expertise in, and you are interested in
either writing or contributing to a book, please visit We have worked with
thousands of developers and tech professionals, just like you, to help them
share their insights with the global tech community. You can make a
general application, apply for a specific hot topic that we are recruiting an
author for, or submit your own idea.

Reviews

Please leave a review. Once you have read and used this book, why not
leave a review on the site that you purchased it from? Potential readers
can then see and use your unbiased opinion to make purchase decisions.
We at BPB can understand what you think about our products, and our
authors can see your feedback on their book. Thank you!

For more information about BPB, please visit

Join our book’s Discord space

Join the book’s Discord Workspace for Latest updates, Offers, Tech
happenings around the world, New Release and Sessions with the
Authors:

https://discord.bpbonline.com
Table of Contents

1. Working with Concepts

Introduction

Structure

Objectives

Recipe 1.1: Creating your first concept

Recipe 1.2: Using a concept

Suggestion

Recipe 1.3: Creating a constraint

Recipe 1.4: Creating a conjunction

Suggestion

Recipe 1.5: Making a requires clause

Recipe 1.6: Constraining a function


Recipe 1.7: Creating a requires expression

Recipe 1.8: Multiple requires expressions

Recipe 1.9: Nested requirements

Recipe 1.10: Function templates

Recipe 1.11: Compound requirements

Recipe 1.12: Different types of expressions

Recipe 1.13: Specializations

Conclusion

Points to remember

References

2. Using the New Core Language Concepts

Introduction

Structure

Objectives
Recipe 2.1: same_as

Recipe 2.2: convertible_to

Recipe 2.3: derived_from

Recipe 2.4: integral, signed_integral, unsigned_integral

Recipe 2.5: floating_point

Suggestion

Recipe 2.6: assignable_from

Suggestion

Recipe 2.7: swappable

Recipe 2.8: destructible

Recipe 2.9: constructible_from

Recipe 2.10: default_initializable

Recipe 2.11: move_constructible, copy_constructible


Recipe 2.12: common_with and common_reference_with

Conclusion

Points to remember

References

3. Using the New Comparison Concepts

Introduction

Structure

Objectives

Recipe 3.1: equality_comparable

Recipe 3.2: equality_comparable_with

Recipe 3.3: totally_ordered

Suggestion

Recipe 3.4: totally_ordered_with

Recipe 3.5: three_way_comparable


Suggestion

Recipe 3.6: three_way_comparable with custom types

Suggestion

Recipe 3.7: three_way_comparable_with

Conclusion

Points to remember

References

4. Using the New Iterator Concepts

Introduction

Structure

Objectives

Recipe 4.1: weakly_incrementable

Recipe 4.2: input_or_output_iterator


Recipe 4.3: sentinel_for

Recipe 4.4: sized_sentinel_for

Recipe 4.5: indirectly_readable

Recipe 4.6: indirectly_writable

Recipe 4.7: incrementable

Recipe 4.8: input_iterator

Recipe 4.9: output_iterator

Recipe 4.10: forward_iterator

Recipe 4.11: bidirectional_iterator

Recipe 4.12: random_access_iterator

Recipe 4.13: contiguous_iterator

Recipe 4.14: indirectly_movable, and indirectly_movable_storable

Recipe 4.15: indirectly_copyable, and indirectly_copyable_storable

Recipe 4.16: indirectly_swappable


Recipe 4.17: indirectly_comparable

Recipe 4.18: permutable

Recipe 4.19: mergeable

Conclusion

Points to remember

References

5. Using the New Object Concepts

Introduction

Structure

Objectives

Recipe 5.1: movable

Suggestion

Recipe 5.2: copyable


Recipe 5.3: semiregular

Recipe 5.4: regular

Conclusion

Points to remember

References

6. Using the New Callable Concepts

Introduction

Structure

Objectives

Recipe 6.1: invocable

Suggestion

Recipe 6.2: regular_invocable

Recipe 6.3: predicate

Recipe 6.4: relation and equivalence_relation


Recipe 6.5: strict_weak_order

Recipe 6.6: indirectly_unary_invocable, and


indirectly_regular_unary_invocable

Recipe 6.7: indirect_binary_predicate

Recipe 6.8: indirect_equivalence_relation

Recipe 6.9: indirect_strict_weak_order

Conclusion

Points to remember

References

7. Const Related Specifiers

Introduction

Structure

Objectives

Recipe 7.1: Looking at the constexpr enhancements


Recipe 7.2: constexpr for transient allocation

Recipe 7.3: consteval

Recipe 7.4: constinit

Recipe 7.5: constexpr if

Recipe 7.6: if consteval

Recipe 7.7: Some hidden problems with constexpr

Conclusion

Points to remember

References

8. Concurrent Processing

Introduction

Structure

Objectives

Recipe 8.1: std::jthread is the new thread


Recipe 8.2: std::stop_token

Recipe 8.3: std::stop_callback

Recipe 8.4: std::stop_source

Recipe 8.5: std::counting_semaphore, and std::binary_semaphore

Recipe 8.6: std::atomic, and std::atomic

Recipe 8.7: std::atomic::wait, and std::atomic::notify*

Recipe 8.8: std::latch

Recipe 8.9: std::barrier

Recipe 8.10: std::atomic_ref

Conclusion

Points to remember

References

9. Coroutines
Introduction

Structure

Objectives

Recipe 9.1: What is a coroutine

Recipe 9.2: Components of a coroutine: The promise

Recipe 9.3: Components of a coroutine: The state, and the handle

Recipe 9.4: Coroutine restrictions

Recipe 9.5: Generators

Conclusion

Points to remember

References

10. Organizing Your Code with Modules

Introduction
Structure

Objectives

Recipe 10.1: What is a module

Recipe 10.2: What the compiler does with a module

Recipe 10.3: How to use a module

Recipe 10.4: Visibility and reachability

Recipe 10.5: Layout of a module

Recipe 10.6: Cyclical modules

Recipe 10.7: Importing the standard modules.

Recipe 10.8: What are module partitions

Conclusion

Points to remember

References

11. Introduction to Ranges and Views


Introduction

Structure

Objectives

Recipe 11.1: What is a range

Recipe 11.2: What is a view

Recipe 11.3: What is a span

Recipe 11.4: Range concepts

Recipe 11.5: Range primitives

Recipe 11.6: What is a subrange

Recipe 11.7: What is ranges::dangling

Recipe 11.8: What is a view_interface

Recipe 11.9: What is an owning_view

Conclusion

Points to remember
References

12. Range Access and Non-Modifying Sequence Functions for Ranges

Introduction

Structure

Objectives

Recipe 12.1: Review the basic range access functions

Recipe 12.2: The for_each functions

Recipe 12.3: Looking at count, any_of, all_of, and none_of functions

Recipe 12.4: Looking at comparison functions

Recipe 12.5: Search functionality

Conclusion

Points to remember

References
13. Range Algorithms: Sort, Search and More

Introduction

Structure

Objectives

Recipe 13.1: Minimum and maximum functions

Recipe 13.2: Sorting and partitioning functions

Recipe 13.3: Binary search functions, and set functions

Recipe 13.4: Permutation functions

Recipe 13.5: Fold functions

Conclusion

Points to remember

References

14. Range Algorithms: Memory and Modification Functions

Introduction
Structure

Objectives

Recipe 14.1: Heap functions

Recipe 14.2: Uninitialized memory functions

Recipe 14.3: Modifying sequence functions

Conclusion

Points to remember

References

15. Views and Range Adaptors

Introduction

Structure

Objectives

Recipe 15.1: Progressing from views and ranges, to range adaptors


Recipe 15.2: Some simple range adaptors

Recipe 15.3: Using take() and drop() adaptors

Recipe 15.4: Using range adaptors with composition

Recipe 15.5: Using filter() and transform() adaptors

Recipe 15.6: Working with the join() and split() adaptors

Recipe 15.7: Working with the keys() and values() adaptors

Recipe 15.8: Using chunk() and slide() adaptors

Recipe 15.9: Using zip() adaptor

Recipe 15.10: A quick look at reverse()

Recipe 15.11: Looking at special adaptors

Conclusion

Points to remember

References
16. Range Factories and Utilities

Introduction

Structure

Objectives

Recipe 16.1: Factory overview, and the ranges::iota_view factory

Recipe 16.2: The views::repeat, and views::cartesian_product

Recipe 16.3: Creating your range factory

Recipe 16.4: Formatting ranges

Recipe 16.5: Swapping ranges

Recipe 16.6: The utility ranges::to

Conclusion

Points to remember

References

17. New Features for Containers


Introduction

Structure

Objectives

Recipe 17.1: Contains

Recipe 17.2: Looking at std::span

Recipe 17.3: std::counted_iterator

Recipe 17.4: std::is_bounded_array and std::is_unbounded_array

Recipe 17.5: std::to_array converts to std:array

Recipe 17.6: std::erase and std::erase_if

Recipe 17.7: std::flat_map and std::flat_set

Recipe 17.8: Iterators pair constructors for stack and queue

Recipe 17.9: Allow default arguments for pair’s forwarding constructors

Recipe 17.10: The push_range() function for queue, stack, and


priority_queue
Recipe 17.11: What is std::mdspan

Conclusion

Points to remember

References

18. Making it Easier to Code

Introduction

Structure

Objectives

Recipe 18.1: String formatting

Recipe 18.2: std::print

Recipe 18.3: starts_with and ends_with for strings

Recipe 18.4: Other enhancements for strings and ranges

Recipe 18.5: using enum reduces typing for enums

Recipe 18.6: New date features


Recipe 18.7: New time features

Recipe 18.8: Timezone library

Recipe 18.9: std::midpoint

Recipe 18.10: includes pi and e

Recipe 18.11: Bit manipulation

Recipe 18.12: Designated initializer for aggregates

Conclusion

Points to remember

References

19. Making Your Code Cleaner

Introduction

Structure

Objectives
Recipe 19.1: Familiar template syntax Lambdas

Recipe 19.2: Lambda parameter packs

Recipe 19.3: Literal class types in non-type template parameters

Recipe 19.4: Multidimensional subscript operator

Recipe 19.5: std::make_shared supports arrays

Recipe 19.6: CTAD improvements

Recipe 19.7: Deducing this

Recipe 19.8: Transforming auto

Recipe 19.9: char8_t and std::u8string types

Recipe 19.10: Suffix for std::size_t

Recipe 19.11: Named universal character escapes

Recipe 19.12: Monadic operations for std::optional

Recipe 19.13: Using std::expected

Recipe 19.14: Pre-processing directives elifdef and elifndef


Exploring the Variety of Random
Documents with Different Content
The Project Gutenberg eBook of Nick Carter Stories
No. 150, July 24, 1915: The House of Fear; or, Nick
Carter's Counterstroke
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: Nick Carter Stories No. 150, July 24, 1915: The House of Fear;
or, Nick Carter's Counterstroke

Author: Nicholas Carter


Ralph Boston

Release date: May 18, 2022 [eBook #68116]

Language: English

Original publication: United States: Street & Smaith, 1914

Credits: David Edwards, Chuck Greif and the Online Distributed


Proofreading Team at https://www.pgdp.net (Northern Illinois
University Digital Library)

*** START OF THE PROJECT GUTENBERG EBOOK NICK


CARTER STORIES NO. 150, JULY 24, 1915: THE HOUSE OF
FEAR; OR, NICK CARTER'S COUNTERSTROKE ***
Issued Weekly. Entered as Second-class Matter at the New York Post Office,
by Street & Smith, 79-89 Seventh Ave., New York.
Copyright, 1915, by Street & Smith. O. G. Smith and G. C. Smith,
Proprietors.
Terms to NICK CARTER STORIES Mail Subscribers.
(Postage Free.)
Single Copies or Back Numbers, 5c. Each.
3 months 65c.
4 months 85c.
6 months $1.25
One year 2.50
2 copies one year 4.00
1 copy two years 4.00
How to Send Money—By post-office or express money order, registered
letter, bank check or draft, at our risk. At your own risk if sent by currency,
coin, or postage stamps in ordinary letter.
Receipts—Receipt of your remittance is acknowledged by proper change of
number on your label. If not correct you have not been properly credited,
and should let us know at once.
No. 150. July 24, 1915. Price Five Cents.
THE HOUSE OF FEAR;
Or, NICK CARTER’S COUNTERSTROKE.

Edited by CHICKERING CARTER.


CHAPTER I.

THE DEAD ALIVE.

"I say, shir! Can you let me have a match?"


"I think so."
The last speaker was Nick Carter, the famous detective.
The first was an erect, well-built, fashionably clad man, apparently in the
forties and somewhat the worse for liquor. His crush hat had a rakish cant.
His Inverness hung awry over his shoulders. His cravat had a disorderly
twist, and his brown, Vandyke beard had lost its carefully combed
appearance.
Nick Carter sized him up as a society man who had been on the bat, and
who was returning home on foot to walk off the effects of it. His appearance
and the hour seemed to warrant this conclusion, for it was two o’clock in the
morning.
Nick was rather roughly clad. His strong, clean-cut face was so
artistically treated with grease paint as to effectively disguise him and give
him a decidedly sinister aspect. He had spent most of the night in searching
for a crook, on whom he very much wanted to lay his hands, but his efforts
had been futile, and he was returning to his residence in Madison Avenue.
He had turned a corner of Fifth Avenue only a few moments before, when
he saw the stranger approaching, walking a bit unsteadily, and then the only
person to be seen in the fashionable street.
Nick saw him fishing out a cigar and vainly searching in his pockets for a
match, and he was not surprised when the man stopped him with the above
request, straightening up with a manifest effort and trying to speak distinctly.
"Much obliged, sir," said he, when Nick reached into his pocket after his
match box. "Will you smoke, I’ve got anozzer."
"No, none for me, thank you," said Nick. "I——”
"Don’t thank me. Do what I tell you, instead, and do it quick. Hands up!"
The stranger had undergone a lightninglike change. He no longer
appeared intoxicated. His every nerve and muscle seemed to have become as
tense as a bowstring. His eyes were clear, aglow like balls of fire, and his
voice had turned as hard as nails.
His right hand, with which he had pretended to reach into his pocket for
another cigar, whipped out an automatic revolver, into the deadly muzzle of
which the detective suddenly found himself gazing.
Nick Carter had been up against like situations before, and it did not
disturb him.
"What are you really going to do with that toy?" he asked coolly, sharply
scrutinizing the holdup man to fix his face in his mind.
"Hands up, or you’ll never repeat that question," said the other, hissing
the threatening words between his teeth. "Up with them, or you’ll be a dead
one."
His eyes had a gleam and glitter that no sane man would have ignored.
They spelled murder in capital letters, and Nick obeyed and raised his hands
as high as his shoulders.
"Now, back down those steps," commanded his assailant. "Keep going till
I tell you to stop. Back under the steps. Hands up, mind you, or you’ll be
found dead there in the morning."
The steps referred to were those of a handsome brownstone residence
occupied by a wealthy Wall Street banker and broker, Mr. Gideon Buckley.
They led up from the sidewalk to the vestibule of the front door, while under
them was a door leading into the basement hall of the house. This was
accessible by descending two low steps and turning into the area under the
main rise of steps, the entrance to which area was protected with an iron-
grille door, then wide open.
Nick obeyed his assailant—he had no sane alternative.
He backed down the two low steps and into the gloomy area under the
main flight, and the holdup man quickly closed the grille door and the spring
lock clicked audibly, confining the detective under the rise of front steps.
The holdup man laughed—but not for an instant did his deadly weapon
deviate from a direct line from the detective’s breast. He still kept him
constantly covered through the grille door, through which he gazed at him
with gleaming eyes, as one might have viewed a lion in a steel cage.
The miscreant’s laugh was utterly void of anything like mirth. It was as
cold, exultant, and merciless as ever had fallen on the detective’s ears. In a
way, moreover, it struck him as being familiar, but he did not recall when
and where he had heard it. He was not, however, left long in doubt of the
outlaw’s identity.
For the rascal’s vicious laugh ended with a sharp, hissing whisper.
"You keep your voice down, now, or there’ll be something drop," he
threatened. "Speak above a whisper and I’ll plug you on the instant."
"I’ll take your word for it," Nick said quietly. "But you are not going to
get fat from this job. If you lift all I have in my jeans, you’ll not carry away
much."
"Oh, I’m not after your coin," the holdup man retorted, with bitter
asperity. "I’ve not run you in here to lift anything. I’ve got you where I want
you, at last, and you’re going to hear my little verse. I’ll finish you later."
"Why finish me?" Nick coolly inquired. "What have I done that you want
to finish me?"
"You’ve done me, blast you," was the reply, with suppressed ferocity.
"You twice have crossed my path and turned me down. You have sent me
from bad to worse and made me what I am. I know you, Carter, hang you, in
spite of your disguise. I have been watching for you, lying in wait for you,
and I’ve got you where I want you."
"Which seems to please you mightily," Nick said dryly, trying vainly to
recall the rascal’s identity. "When did I——”
"Oh, I’ll tell you when," interrupted the other, with unabated bitterness.
"You’ll know when, Carter, when you see my face. I’ll reveal it to you. I
want you to see it, that I may laugh at you, mock you, and tell you face to
face how deeply I hate you. Sooner or later, too, I’ll hand you yours and
send you to the devil.
"But not to-night—no, not to-night!" he went on, when Nick viewed him
in silence. "I want you to anticipate it, to live in fear of it, to be racked mind
and nerves until my bullet finds you. I’ll send it into you sooner or later,
Carter, as sure as my name is—Gaston Goulard."
He removed his Vandyke beard while speaking, thrusting it into his
pocket, and Nick Carter was given an almost incredible surprise.
"Gaston Goulard!" he exclaimed involuntarily. "The dead alive!"
Nick recognized him now. There was no mistaking his hard-featured,
white face, its sinister scowl, its expressive cruelty. To have seen a ghost,
however, would not have been more amazing.
For Nick last had seen this man less than a month before, when cornered
with the notorious Badger gang of crooks in an old lime loft leased by one of
their number, to which the detective’s assistants had traced Nick and the
criminals—Nick last had seen him plunge bodily through one of the
windows and disappear into the swirling waters of the East River.
Though a sharp watch had been kept by Patsy Garvan, moreover, who
also had seen the rascal sink from view, Goulard did not reappear on the
surface, and there had seemed to be no reasonable doubt that the knave had
drowned.
Naturally, therefore, Nick was more than surprised upon seeing his
sinister, malevolent face again; nor was it strange that, supposing him dead,
he had not penetrated his exceedingly clever disguise, or recognized his evil
voice.
It fell again upon the detective’s ears, echoing his last impulsive remark.
"The dead alive—yes!" Goulard hissed triumphantly. "I fooled you,
balked you, eluded you, Carter, and I finally will send you to the devil,
where you supposed you had sent me. But the devil serves his own at times,
and that was one of them. He gave me a new lease of life—that I might
finally take yours. But not to-night, Carter, not to-night!"
"That’s very considerate, Goulard, I’m sure," Nick coldly retorted.
"Watch out that I don’t put the boot on the other leg and place you where
you belong."
"Bah!" Goulard ejaculated, under his breath. "You have no chance of that,
not even a look in. You know not where to find me, yet for the past month I
have been under your very eyes. I can put my finger on you, too, any hour of
the day, Carter—and I shall always have a bullet in reserve for you."
Nick Carter ignored the miscreant’s repeated threats, though he knew him
to be capable of executing even the worst of them. Watching vainly, too, for
a chance to turn the tables on the scamp, for Goulard was not to be caught
napping, Nick coldly inquired:
"How did you accomplish it, Goulard? How did you escape from the East
River?"
"I told you the devil serves his own at times," Goulard proceeded to
explain, though Nick had hardly expected him to do so. "I rose to the
surface, but not in view of your lynx eyes, Carter, nor those of your
assistants."
"I already know that," said Nick.
"The swirl of the stream sucked me down—down—down!" Goulard went
on fiercely. "I thought I would never rise. I thought of you, too, and even
with death staring me in the face I regretted only that I had not lingered to
kill you. I was carried down near the river wall. I was beaten on rocks and
battered against bowlders. It was awful! I thought I would never rise—but I
did! I came to the surface under a boatman’s float thirty yards from the lime
shed."
"Ah, I see," said Nick, unruffled by the other’s bitterness. "That’s how the
devil served you, is it? You remained under the float till dark, I take it."
"Until after dark," corrected Goulard. "I clung to its timbers, cursing you
all the while, and I then contrived to climb the river wall and steal away
unseen. But you see me now, Carter, and soon shall feel the sting of my
revenge. I wanted you to know it—that I am alive and out for vengeance.
That alone impelled me to hold you up to-night."
"Cease your threats," Nick commanded. "They have no weight with me.
Having held me up and locked me in this place, Goulard, what do you intend
doing?"
"I will leave you here," Goulard replied, with an uglier scowl on his white
face. "I’ll not take the risk of a shot at this time. It’s too long a chance. I will
leave you here with my threats ringing in your ears. You shall have time to
think of them, to anticipate the end, to dread the day when I will make good.
You shall live in a house of fear from this hour, Carter, in constant fear."
"The future will determine that, Goulard, and whether you were really
lucky in not meeting your fate in the East River," Nick coolly answered. "If
you have no more to say and do, you cannot depart too quickly. Get out, you
rat, the sooner the better."
Goulard laughed again and pushed his revolver farther through the grille
door.
"I’d love to, Carter!" he cried, under his breath. "I’d love to press the
trigger and perforate your cursed skin with a bullet. But the risk is too great.
I might be heard, intercepted in my flight, and perhaps railroaded to the
chair. There will be a safer time and place. I will wait for it, watch for it, and
there then will be no hesitation. I will kill you, Carter, for what you have
done to me. As sure as God hears me—I will kill you."
"God may intervene and——”
"Remember!"
The fierce, malevolent face, pressed for a last moment to the grille door,
vanished instantly, and the vengeful knave was gone.
Nick Carter heard his swiftly receding steps on the pavements. It was the
only sound that broke the night silence in that locality. It died away so
quickly, too, that it had seemed hardly perceptible.
Nick seized the grille door and tried to open it—tried vainly.
It withstood his utmost efforts.
CHAPTER II.

PARTNERS IN CRIME.

Nick Carter was not disturbed in the least degree by the threats of Gaston
Goulard. He had been threatened too frequently by crooks to pay any
attention to their sinister predictions.
They had no weight with the detective, therefore, those of this whilom
merchant who had wrecked the big department store in which he had been a
partner, and who then had gone deeper into the criminal mire, mingling with
crooks and gangsters, resulting in a murder for which he now was wanted by
the police, whom he had eluded less than a month before in the manner
described.
Aside from his surprise at beholding Goulard alive, the entire incident
would have had no great weight with Nick Carter, in fact, except for one
reason—the extraordinary episodes that immediately followed.
These alone, with their far-reaching results and because they exhibited
from the first the remarkable discernment and versatility of the celebrated
detective, made this night a noteworthy one in the record of his professional
work.
Finding that immediate escape from under the stone steps was
impossible, and that he could not at once pursue Goulard, Nick proceeded
more deliberately to seek means to liberate himself. He knew that he could
not have been overheard by any person in the house, having spoken only in
whispers, while hardly a sound had been made that would have been audible
ten feet away.
"The rascal must have been watching me, as he said, and contrived to
intercept me in front of this house, probably having learned that this grille
door was open, also that it could be quickly and securely locked. Securely
locked, by Jove, is right!"
Nick had taken out his electric searchlight and was inspecting the grille
door. He found that it had a strong Yale lock, to pick which was out of the
question. It looked, in fact, as if it would be utterly impossible to open the
door without a key.
"By gracious, I don’t half like this," thought Nick, pausing to consider the
situation. "There is no getting out unaided by the way I entered. I can bang
on this other door, of course, and raise some one in the house, who could
come down and liberate me. That would necessitate a truthful explanation,
however, and the story might leak out.
"It would be embarrassing, at least, to read in all of the newspapers that
the famous New York detective was caught and cornered in such a hole as
this by a midnight marauder. The sensational journals would feature it with
red letters, for fair, and make the most of it. I don’t think I could stand for
that.
"Instead of raising any one, therefore, I’ll try to quietly open this other
door, which evidently leads into a basement hall. If I can enter unheard, I
then can steal up to the main hall and out through the front door. None will
then be the wiser, as far as I am concerned, and Goulard will not be fool
enough to expose me. He will foresee, of course, that I shall keep my mouth
closed. Let the crafty rascal alone to feel sure of that."
Having decided that to be the easiest way out of his dilemma, Nick turned
his attention to the door leading to the basement hall. He found it had only
an ordinary lock, and that the key had been removed.
"Well, well, this will be soft walking," he said to himself. "I can open it
with a picklock in two shakes of a lamb’s tail. In a minute more, that done, I
can slip out of the house unheard."
Fishing out a ring of keys on which he had the practical little implement
mentioned, Nick quietly inserted it into the lock, and a moment later he
noiselessly shot the bolt and opened the door.
Then began the series of sensational episodes that made his work of that
night so noteworthy.
Nick stepped into the basement hall, then quietly closed the door, locking
it with a key found hanging on a nail near the casing, and which he
discovered by means of his searchlight.
He then paused and listened vainly for any sound from the floors above.
Obviously, no one in the house had yet been disturbed.
"The way is open, all right, so here goes," he said to himself, after a
moment.
A flash from his searchlight revealed the stairway leading to the main
hall.
Nick tiptoed toward it and began the ascent.
The top of the stairway ended near the middle of the main hall, and under
the rise of stairs leading up to the next floor.
Nick arrived at the top stair, holding his breath, treading as if on eggs, and
feeling his way by means of the wall on one side and the baluster rail on the
other.
Despite his exceeding care, however, the top stair creaked slightly under
his weight.
The noise, though hardly perceptible under ordinary conditions, fell
audibly on the surrounding stillness.
It was instantly followed by another, hardly more perceptible, but
sufficient to make the detective doubly alert.
The sound came from a room across the hall, the door of which was open.
Nick waited, lest the stair might creak again if he stirred. Bending nearer
the baluster rail, nevertheless, he could see through the open door of the
opposite room.
It was the library of the handsomely furnished house.
With the exception of one part of the room, all was invisible, shrouded in
inky darkness.
The exception was a circle of light shed upon an open desk—faintly
revealing a figure crouching in front of it.
It appeared to be that of a man engaged in robbing the desk, or quietly
forcing the interior drawers in search of something.
Nick waited and watched.
"By Jove, here’s a curious coincidence," he said to himself. "Have I
stolen in here just in time to catch a crook? Apparently, however, I’m in his
class. He may, on the other hand, be some one who lives in the house and
who has some motive for stealthily searching that desk. No, by gracious,
that’s not probable. He certainly is a crook."
The figure crouching at the desk had turned slightly and gazed toward the
hall, as if under the impulse of sudden uneasiness, or that subtle sense which
at times impresses one of the presence of another.
Nick then saw that the lower part of the man’s face was covered with a
black cloth—convincing him that he was a thief from outside, rather than a
resident of the house.
He turned, after listening for a moment, and resumed his knavish work.
Nick Carter’s first impulse was to arrest the thief then and there—but he
did not do so.
Another and better move, in view of the greater possibilities it presented,
quickly occurred to him.
"By Jove, this may be the opportunity of a lifetime," he said to himself.
"It’s odds that the rascal is not alone, that he has one confederate, at least,
who may be watching outside, probably in the rear of the house. I can fool
this scamp and gather in both of them, I think, or even round up a bigger
gang with which they may be identified. That surely would discount taking
in only this fellow. I’m blessed if I don’t try it."
Nick had recalled his sinister make-up, also that he had several changes
of disguise in his pocket. He deftly adjusted one over his already hangdog
type of countenance, then glided quickly under the rise of stairs mentioned,
crouching low against the baseboard in one corner.
The top of the basement stairs creaked again when he left them, precisely
as he had anticipated.
The effect, moreover, was exactly what he was expecting.
The figure at the library desk started up as if electrified by the faint
sound.
The circle of light from the flash lamp vanished instantly, leaving the
room and hall in impenetrable gloom.
"He heard it," thought Nick, holding his breath. "He’s waiting and
listening. He fears that some one is here, but he is not sure."
The waiting detective was right. He presently could hear the stealthy,
catlike tread of the crook approaching the near door. It ceased after a
moment, and Nick knew that the rascal then had reached the threshold and
again was listening intently.
Nearly a minute passed, one minute of absolute silence and inky
darkness.
Then a swift beam of light shot through the hall—but not under the stairs.
It was gone as quickly as it came, only to be repeated a moment later,
leaping swiftly the entire length of the broad hall.
The crook saw no one, and he then stepped noiselessly toward the main
stairway, where he paused once more to listen.
It was the move the detective had expected, and for which he was
waiting. Rising noiselessly, Nick quickly glided nearer, then suddenly
clasped the motionless black figure in his arms.
A thrill of amazement went through him from head to foot.
The form he had clasped, confining both arms and preventing the use of a
weapon—was that of a woman.
Amazement, however, did not cause Nick Carter to lose his head. He held
fast to the supple, writhing figure of the unknown female, who wriggled
vainly to free herself and reach for her revolver, while the detective quickly
whispered, in tones well calculated to dispel her fears:
"Whist! Keep quiet! I wa’n’t wise to your being a skirt. What’s your
game here?"
Nick’s quietude also was assuring. The woman ceased struggling, but
turned sufficiently to gaze at his face, as well as it could be seen in the faint
light that came through the pebbled-glass panes of the front door.
Nick now could see the sharp glint of her eyes and the outline of her brow
and cheeks above the bandage of black cloth that covered her mouth and
chin.
"What’s your own game?" she questioned quickly, under her breath.
"What sent you here?"
"I’m on the lift and——”
"You’re not a dick?"
"Dick be hanged! I saw the iron door under the front steps was open, so I
picked the lock of the other to see what I could nail," Nick explained. "I
piped you in yonder at the desk when I crept up the stairs. But I did not
dream you was a skirt."
"Let me go, will you?"
"Sure—if you’ll keep your yap closed."
"Trust me for that."
"I’m not here to be nailed by a bull," Nick added.
"You can gamble that I’m not," muttered the woman. "Say, step in there
with me. We ought to know each other better."
"That hits me all right—but walk on your toes."
Nick had released her, when requested, but the woman clung to him for a
second, as if fain to express her relief with a momentary display of affection.
Together they stole into the library, and she noiselessly closed the door.
"You’re not a dick, then," she remarked, in whispers. "Say, that’s some
load off my mind. I thought sure I was a goner."
"Dick nothing!" Nick muttered derisively. "Have a peek. Do I look like a
dick?"
He fished out his searchlight while speaking, throwing the beam upon
himself. He then removed the disguise he had put on a few moments before,
and displayed the sinister, make-up face beneath it.
It was a ruse that would have deceived the most suspicious of mortals.
None would have supposed for a moment that he was there in double
disguise—this man who now was pretending to be no less a crook than the
woman herself.
She laughed softly and clasped his arm with both hands.
"Say, you’re all right, pal," she whispered. "Flash it on me. I’ll go as far
as you have gone, since you sure seem on the level. Have a look at my mug."
She drew down the black cloth from her face, on which Nick flashed the
beam of light, giving him still another surprise.
"Great guns!" he mentally exclaimed. "Sadie Badger, the queen of the old
Badger gang."
Nick knew both her and the gang, all of whom had figured in the recent
murder case against Gaston Goulard, and all of whom had been sentenced to
prison, with the exception of Goulard himself, who was supposed to have
been drowned, and this one woman against whom sufficient evidence to
connect her with the murder, or show complicity after the crime, could not
be found. She had been liberated, therefore, after the trial and conviction of
the rest of the notorious gang, and she had not since been seen in her
customary haunts.
Nick Carter’s surprise was the greater for that reason, when he now
beheld her in the very act of robbing the house outside of which he had so
unexpectedly encountered Goulard. That they were not confederates in this
robbery was obvious to him, however, for he at once reasoned that Goulard
would not have put the woman in danger of arrest, if he had known that she
was in the house.
Nick now saw, too, that Sadie Badger was clad in a tight-fitting black
jersey, under a loose dark coat, and that she wore knickerbocker trousers,
black stockings, and rubber-soled shoes, all combining to give her the
appearance of a youth under twenty, who might have walked the streets at
almost any hour of the day or night without a challenge from the police.
Nick was quick to appreciate all that this signified, and to take advantage
of the situation he had in part framed up, though his sinister face reflected
none of his true sentiments and designs.
"You’re all right, kid, if looks count for anything," he said quietly. "We
meet by chance, a dead queer chance, but there might be something in it for
both. What’s your name?"
"What’s yours?" questioned Sadie circumspectly.
"Bosey Magee," Nick promptly informed her.
"Bosey?"
"That’s short for Ambrose," whispered Nick. "That’s my moniker. I hang
out in Boston most of the time, but I blew in here last night and went broke
in the stuss joints."
"I get you, pal."
"I held up a bloke an hour back and lifted a small wad. It was not enough,
when I saw that the front-basement door of this crib was easy to get at. You
can find out all about me from Jack Gleason, who runs the Orient House in
Richmond Street, where I hail from," Nick added. "He’ll tell you Bosey
Magee wouldn’t crab a game or squeal on a pal. That’s me, kid."
"And it listens good to me, all right," said Sadie, in approving whispers.
"I’ll meet you on even ground. My name is Sadie Badger, and I’m out for
the coin as you see me, or in any old way I can get it."
"That’s the right sort, Sadie, and you’re in my class. But you’re not
cracking this crib alone, are you?" questioned Nick.
"That’s what, Bosey."
"Where are your pals?"
"I’m leary of pals just now," said Sadie. "I was in with a good bunch and
in right, but an infernal dick got them a month back and sent them up the
river."
"Tough luck," said Nick.
"I ducked the same dose by the skin of my teeth," added Sadie. "I have
got no pals I would bank on now, unless——”
"Unless what?"
"I say, Bosey!" The woman’s low whispers took on a more sibilant
eagerness. "Since you’re here after plunder, and fate has chucked us
together, let’s run in double harness on this job. What d’ye say? Are you
game? Will you be my partner in crime?"
Nick Carter did not hesitate for the hundredth part of a second. He saw
more to be gained than by arresting Sadie Badger then and there. He grasped
her extended hand, replying quickly:
"Will a duck swim? I’d be a fool, Sadie, if I wouldn’t take a chance with
you. Partners in crime—that’s what?"
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!

ebookfinal.com

You might also like