Instant Access To Starting Out With C++: From Control Structures Through Objects, Brief Edition, 9/e Tony Gaddis Ebook Full Chapters
Instant Access To Starting Out With C++: From Control Structures Through Objects, Brief Edition, 9/e Tony Gaddis Ebook Full Chapters
com
https://textbookfull.com/product/starting-out-
with-c-from-control-structures-through-objects-
brief-edition-9-e-tony-gaddis/
https://textbookfull.com/product/starting-out-with-java-from-control-
structures-through-objects-6th-edition-gaddis/
textbookfull.com
https://textbookfull.com/product/narratives-in-research-and-
interventions-on-cyberbullying-among-young-people-heidi-vandebosch/
textbookfull.com
SQL Server 2016 Developer s Guide 1st Edition Dejan Sarka
https://textbookfull.com/product/sql-server-2016-developer-s-
guide-1st-edition-dejan-sarka/
textbookfull.com
https://textbookfull.com/product/statistics-for-engineers-an-
introduction-with-examples-from-practice-1st-edition-hartmut-schiefer/
textbookfull.com
https://textbookfull.com/product/metabolic-signaling-methods-and-
protocols-sarah-maria-fendt/
textbookfull.com
American Foreign Policy Since World War II 18th Edition
Steven W. Hook
https://textbookfull.com/product/american-foreign-policy-since-world-
war-ii-18th-edition-steven-w-hook/
textbookfull.com
Starting Out With C++
From Control Structures through Objects
Brief Version
Ninth Edition
Starting Out With C++
From Control Structures through Objects
Brief Version
Ninth Edition
Tony Gaddis
Haywood Community College
The author and publisher of this book have used their best efforts in
preparing this book. These efforts include the development,
research, and testing of theories and programs to determine their
effectiveness. The author and publisher make no warranty of any
kind, expressed or implied, with regard to these programs or the
documentation contained in this book. The author and publisher shall
not be liable in any event for incidental or consequential damages
with, or arising out of, the furnishing, performance, or use of these
programs.
Title: Starting out with C++. From control structures through objects /
Tony
1 18
ISBN-13: 978-0-13-489573-4
ISBN-10: 0-13-489573-8
Contents at a Glance
Preface xv
Index 995
Appendix E: Namespaces
Appendix K: Unions
2.5 Identifiers 42
2.6 Integer Data Types 43
2.13 Scope 62
2.15 Comments 71
Programming Challenges 81
Appendix E: Namespaces
Appendix K: Unions
“How very sober Mr. Hammond seems to-night! I hope he isn’t going
to be cross.”
Though she spoke gayly enough, a vague sense of ill was stealing
over her. She sat down on a low cane settee, over which flowering
shrubs made a sort of canopy, and a sadness seemed to breathe in
the heavy scent of tuberose and stephanotis.
Captain Mauleverer placed himself beside her, and looked at her with
a certain respectful pity as he answered:
“That isn’t likely. I’m sure it wouldn’t be easy to be cross with you,
Miss Yorke.”
Belle detected something in his voice which increased her
foreboding.
“You look as grave as Mr. Hammond. Is anything the matter?”
“Yes, I’m afraid there is.”
The moment he had spoken the words he wished them unuttered.
The light faded out of the beautiful eyes, and a pathetic sadness
took its place.
“Oh, please don’t tell me that!” she pleaded. “I am enjoying myself
so much this evening.”
“Are you? I am glad of that,” said Mauleverer, tugging uneasily at his
mustache.
“Yes; I have never been to a place like this before, you know, and it
is all so strange and beautiful. I am a little bit afraid of the
Marchioness of Severn, but every one else has been so kind that I
haven’t felt myself a stranger. I feel almost like the little chimney-
sweep who wandered by accident into the state bedroom of the
castle, and turned out to be the rightful heir. Please don’t send me
back to my chimney.”
The captain swallowed something in his throat.
“I wish I hadn’t promised to, but the fact is I have undertaken to
give you a message.”
This time Belle turned to him with a look of something like alarm.
“Can’t you put it off till to-morrow? Do let me have my dream out to-
night.”
Mauleverer shook himself.
“Hang it! I have a great mind to,” he exclaimed.
“Please do, if it is an unkind message. I didn’t think I had any
enemies.”
“You have none—at least, I don’t believe you have. It isn’t that.
What I have promised to tell you is something about yourself,
something you ought to know.”
“Something about myself! Oh, what do you mean? I haven’t been
doing anything wrong, have I?”
Captain Mauleverer bit his lip and looked more than half inclined to
run away. Then he said, slowly:
“Perhaps I should have said—something about your father.”
“My father!” She gazed at him in astonishment. “But he is dead! He
died before I was born.”
“No!”
The answer struck her dumb. She sat still and pressed her hand
against her heart. The man replied to her unspoken questions with a
grave shake of the head.
“My father is not dead? Oh, Captain Mauleverer, what are you
saying? What do you know about him?”
“I wish I didn’t have to speak to you like this. Your father is alive.”
“And they have always told me he was dead! My mother— Captain
Mauleverer, are you sure of what you say?”
“I am. I know your father.”
“Then why—” She broke off in the midst of the question and wrung
her hands. “Ah! I begin to understand. My father has done
something that has made them hide his existence from me. And you
are going to tell me what it is.”
“I—well, I promised that I would.”
She gave a half-sob.
“You may go on now. I find that I am only the little chimney-
sweeper after all. But stay!” A fresh thought struck her with
overwhelming force. “Perhaps this is some mistake after all. You say
my father is alive, but did you know that my mother had been
married again?”
The captain clenched his fists.
“God forgive me—I can’t tell you!”
“Then—then there is only one explanation, Captain Mauleverer.” She
hid her face in her hands for a minute, and then raised it again and
looked him bravely in the face. “Is that it? Tell me the truth.”
Mauleverer sprang from his seat.
“No, I’m damned if I do!”
A burst of music and a babble of tongues told them that the door
had opened again, and some one else was coming in. It was the
Marchioness of Severn, and she was alone.
Belle rose from her seat dry-eyed.
“Ah, Miss Yorke, they told me I should find you here. That will do,
Gerald. Miss Yorke and I are going to have a little talk. Pray sit down
again.”
Belle resumed her seat in silence, with an inward dread of what was
in store for her next, while Captain Mauleverer walked off with the
hang-dog air of a man who feels he has made a brute of himself.
The marchioness sat down beside her guest.
“I have to thank you for a most delightful evening. You sang most
charmingly. I almost wish I hadn’t asked you for that one called
‘Little Willy,’ though. I am so sensitive. You almost made me cry—
you did, indeed.”
Belle stole a timid glance at her.
“It is very kind of you to praise me so much. That song of mine has
always been a favorite.”
“I don’t wonder at it. Dear, sweet little thing, freezing to death like
that! Why didn’t some one give him a seal-skin jacket? And do you
really sing things like that at those dreadful places in Leicester
Square?”
Belle began to feel uncomfortable. The patronage it was difficult to
resent, but the hinted disparagement roused her courage.
“I am sorry you think them dreadful,” she said, modestly but quite
firmly, “because, you know, I have to sing there for my living.”
The marchioness’s determined good-nature was not to be turned
aside.
“No, no; of course, I ought not to have called them that before you.
But one reads such shocking things about them in the newspapers
when they apply for their licenses to the County Council. I’m sure I
hope it isn’t half of it true.”
“I hope you won’t be offended if I stand up for them,” Belle
persisted, bravely. “I must be loyal to my own profession, mustn’t I?”
“Of course! Of course! Most properly. I hope—in fact, I am sure, that
they have done you no harm. But I have heard so much about these
places, and the life, that it makes me feel the very gravest doubt. I
take an interest in you, Miss Yorke, and I should be so sorry if you
were to lower yourself by your connection with the music-halls.”
Still bleeding from the wound dealt her in all respectful kindness by
the man who had been with her just before, Belle roused herself to
ward off the more envenomed stabs of the woman who was with her
now.
“I don’t intend to lower myself, or to let myself be lowered, by any
place I may go to,” she said, with dignity, looking the marchioness in
the face.
The marchioness smiled on her like a mother.
“That is right. I am so glad to hear you say that. But you can’t be
too careful, you know. The world is so censorious. Society has very
keen ears for the least whisper against a woman’s name.”
This time Belle realized that there was some serious purpose
beneath her persecutor’s moralizing. She turned on her indignantly.
“I hope you don’t mean that society has been listening to any
whispers against my name!” she cried.
The marchioness put out her hands with a soothing gesture.
“Oh, no—not yet, at all events. Still, as I say, you cannot be too
careful in your unfortunate position. I thought I ought to take the
opportunity of giving you a friendly warning. It is so easy to check a
thing of this kind at the outset, but afterwards it may be too late.”
“I am afraid I don’t understand you yet,” said Belle, in a carefully
measured voice which would have betrayed the rising anger to a
duller ear than the Marchioness of Severn’s. “Do you mean to say
that there is anything for me to check?”
The marchioness, becoming slightly nervous, tried to beat about the
bush.
“No, no; I won’t go so far as that. I don’t put it in that way—merely
a possibility, that is all. Of course, it is very natural that the men who
go to such places should admire you, with your voice and figure;
only don’t let one particular man admire you more openly than the
rest. You understand me?”
Belle’s voice became cold and metallic.
“Do you mean that there is some one whose name has been
associated with mine as an admirer more than the rest?”
The marchioness bowed and smiled.
“That is just it. You have put it very nicely.”
“May I ask you to tell me his name?”
The marchioness threw a glance of mild reproach at her young
friend.
“Surely, my dear Miss Yorke, you must know that! Every one tells me
that his attentions have been most marked—Mr. Hammond.”
The marchioness brought out the name with a jerk, watching her
victim keenly the while. But Belle gave her no assurance, by so
much as the flutter of an eyelid, that the shaft had gone home.
“Mr. Hammond’s attentions to me have always been perfectly
respectful.”
The marchioness positively bubbled over with shame at the implied
suggestion that she had thought otherwise.
“Of course! Naturally! But you know, my dear girl, that society will
take a very different view. Society is so incredulous. It never believes
that a man’s friendship for a woman is perfectly respectful.”
“Not when he asks her to become his wife?” Belle could not resist
the question.
“That is quite different.” The marchioness suddenly became the
great lady. “We are not talking of that, as you know. Mr. Hammond is
not one of those foolish young men who marry a girl out of their
own class and regret it ever afterwards. You must put that idea out
of your head at once, believe me. I am speaking as your friend and
as a woman of the world.”
Belle looked at her friend for a moment with a silence that had
something satirical in it.
“What is Mr. Hammond’s class?”
“Don’t you know? Mr. Hammond is a millionaire. He moves in the
very best society. He could marry almost any woman in England,
except royalty. I know dukes, even, who would feel honored by an
alliance with Mr. Hammond.”
All this time it had not occurred to Belle, in her simplicity, that she
could possibly be regarded by the great lady beside her as a rival,
and a dangerous rival, to her own daughter. She only felt that
something very dear to her was at stake, and she wrestled for it
blindly.
“Is that simply because he is rich?” she demanded, with the scorn
which youth always feels for wealth.
“Not entirely,” the marchioness answered, mildly, “though, of course,
that has a great deal to do with it. But Mr. Hammond comes of a
most respectable family, I believe. I have heard that his father was
quite a gentleman towards the end of his life. And then he has a fine
political career before him; he is in Parliament, and may be in the
Cabinet. You can’t expect him to throw all that away to marry you,
my dear.”
Belle began to fear that she was going to be beaten.
“And would he? Would it be such a very great disgrace?” she
murmured below her breath.
“I don’t say that it would,” replied her deeply sympathizing friend;
“but society would consider it so. You see, we can none of us do all
that we like. There are many things that I should like to do, but I
dare not. We all feel inclined to rebel sometimes and gratify our own
inclinations, but we are restrained by a higher law.”
“What higher law is there than the loyal instinct of our own hearts?”
demanded Belle, with a flash of indignation.
“My dear, the prejudices of society! Its feelings must be respected.
We have to mould our lives accordingly.”
“Why? Why should we obey such a code? Why should we cringe to
this bogie you call society? Why should we make ourselves slaves to
one another’s shadows?”
The marchioness drew herself up and regarded her young friend
with real pain.
“Miss Yorke, you quite surprise me. I am shocked to hear you use
such language. Do you realize what you are saying? You called
society a bogie!”
“I was wrong. It is something more.”
“It is true that its dictates sometimes appear harsh and
unreasonable, but that is the same for all of us. Why should you
expect to be an exception to the rule more than others?”
“Shall I tell you?” All the bitterness of her newly acquired knowledge
rang out in Belle’s voice. “Because I am one of the victims of society;
because it placed its brand upon me before ever I was born. Society
has made me an outlaw, and therefore I owe it no allegiance, and I
will give it none. You tell me that because I am a public singer I
have no right to the friendship of an honorable man; that there are
whispers in circulation against my name already. Let them whisper! I
have done with all that. I shall not abandon my friends at society’s
bidding, and I won’t give up the man I love because it tells me—I
won’t do it!”
The marchioness rose, deeply shocked and grieved.
“Really, I can’t stay here—”
Again the sudden loudness of the sounds from the concert-room.
Again the door stood open, and John Hammond in the doorway.
SCENE IX
AND THE PRINCE
The moment she saw who had come into the conservatory the
marchioness sat down again promptly, and with a decision which
spoke volumes for her intention to remain.
Hammond advanced, and recognized the marchioness with a look of
wonder.
“Where is Mauleverer?” he inquired.
“I sent Gerald away,” replied the marchioness, with an intonation
which plainly added: “And I should like to send you away, too.”
“That was considerate of you,” retorted Hammond, with a pleasant
smile.
There was a vacant space on the seat between the two women, and
he took possession of it with a cool deliberateness which appeared
to cause the marchioness some dismay.
“I wanted to have a little private chat with Miss Yorke,” she
observed, stiffly.
“The very thing I wanted, too. You have done me out of my turn,
hasn’t she, Miss Yorke? You are positively quite a cuckoo, my dear
marchioness.”
The marchioness made a painful effort to smile.
“I am not at all sure that I shall allow you to speak to Miss Yorke,”
she responded, trying to look past him at Belle herself.
On Hammond’s entrance Belle had shrunk back with a certain
apprehension which had afforded secret satisfaction to her hostess.
She now waited in silence, nervously plucking at the leaves of a
camellia which brushed her shoulder where she sat.
“Now she is under my roof,” pursued the marchioness, “I feel in the
position of her guardian. I regard you as a very dangerous
character.”
A smile of bitter irony gleamed for a moment on Hammond’s lips.
“I rather think you must be right. I don’t know why it is, but I am
feeling in a peculiarly lawless mood this evening. If Miss Yorke were
not here, I am not at all sure that your diamonds would be safe.”
Something in the manner of this speech, rather than in the words,
caused the marchioness to move several inches farther off along the
settee. It was a distinct shock to her to hear the Severn diamonds
made the subject of coarse jocularity. The one in the centre of her
bosom had been given to the first Mauleverer by King John as a
reward for resisting the agitation for Magna Charta. Those in the
tiara above her forehead had been brought into the family by a left-
handed daughter of John of Gaunt. The value of the whole was
nearly a year’s income of the much-mortgaged Severn estates.
“Really, Mr. Hammond, you speak so strangely that if I didn’t know
you so well I should think something was the matter with you.”
It was necessary to let her ladyship see clearly that she was out of
place. Hammond cast on her a look which she had not seen in his
eyes before.
“Do you know me well? Does any of us know another well? Don’t
we, most of us, drift through life with our eyes half closed, ignorant
of our aims, ignorant of our very natures, till some shock comes to
awaken us, and in the moment of trial we find out for the first time
who and what we really are?”
A subtle instinct told him, before he had finished speaking, that his
words were being eagerly followed by the girl who sat on his right
hand. On the marchioness they fell with something of the effect of a
cold spray. She shivered and got up.
“Ah, yes, of course, all that is very true, no doubt,” she murmured,
hastily. “But I must really be going back to look after the people.”
She turned a feline glance on Belle. “I wouldn’t sit out here too long
if I were you, Miss Yorke; you may catch cold.”
“Thank you; I am not afraid of that,” was the quiet answer.
The marchioness turned her eyes from one to the other, pursed up
her lips with severity, and reluctantly retreated.
Hammond watched her exit with a sarcastic smile.
“I am afraid the marchioness believes I have been drinking,” he
observed.
The cynicism jarred on Belle as harshly as the seriousness had jarred
on the marchioness. There is no woman who can respond to a man
through all his moods, not even she who loves him best.
“I wonder how much truth there is in what you said just now?”
Hammond turned and fixed an earnest gaze on her. He saw her for
the first time in his experience with a troubled brow, but he never
guessed the cause. There is no man who can follow a woman
through all her moods, not even he who loves her best.
“That is what I wanted to ask you,” he said, in answer to her
question. “We two have known each other for some time, haven’t
we; but how much do I know of you, or you of me?”
Belle felt what was coming. She saw it in his eye, she heard it in his
voice. Desperately she resolved to meet it half-way.
“I have been finding that out this evening. Since I have come here I
have understood for the first time what you are and what I am. Mr.
Hammond, after this evening we must not meet again.”
“Belle! Why do you say that?”
There was a note of anguish in his voice. He had been fighting a
battle with himself all this time. It had never occurred to him that
there might be another to overcome besides.
She looked him steadily in the face.
“Why do you call me Belle?”
“I thought we were friends,” he said. But he blushed as he said it.
“What kind of friends? Would your friendship with Lady Victoria allow
you to call her by her Christian name? Don’t you see that the
difference between her and me makes our friendship impossible?”
“Don’t you trust me, then?” asked the man.
“You have no right to ask me for my trust. You and I belong to
different worlds. Where there is no equality there can be no
friendship. It would have been better if we had never met.”
She spoke with a certain rigidity which baffled him. He did not know
that the poor girl was but repeating the bitter lesson which had just
been taught to her.
“But why,” he eagerly demanded—“why should you suddenly take
this tone with me? I was going to ask you for your confidence. I
meant to beg you to let me take your part against your enemies,
and you rebuff me at the outset like this.”
“Have I enemies? I didn’t know that.” She spoke with a pathetic
resignation. She had heard too much within the last half-hour to be
much moved by any new disclosure. “But there is all the more
reason that I should give them no handle against me. Consider what
society is likely to think of such a friendship as ours—you, a public
man, wealthy, ambitious, honored by the world, with a great career
before you, and I a humble singer, whose very calling makes her
name a mark for every spiteful tongue.”
“Why should we be afraid of what society thinks or says?”
“You can afford to ask that. You are a man, and can defy society; I
am a woman, and to me its breath means life or death.”
Hammond sat silent for a minute; he felt that all this conversation
was insincere. It was but the preface to what he had come there to
say. How was he to pave the way for the questions he had resolved
to put?
“Tell me,” he said, earnestly, “have I ever given you cause to think of
me as other than an honorable man?”
Belle turned and looked at him.
“No,” was all she said.
“Will you let me tell you something—something that it may be
painful for you to hear?”
Belle’s eyes opened wide. The apprehension of what was coming
shone out in them, and Hammond, mistaking the meaning of that
apprehension, faltered in his purpose.
“Speak! What is it?” she commanded.
“It is something which concerns yourself.”
Was he going to repeat to her the gossip at which the marchioness
had only hinted, to tell her to her face that their names had been
joined in the world’s calumnious breath? She gazed at him in
absolute bewilderment.
“Tell it me—quickly!” she breathed.
“I am ashamed to repeat such a slander. Yet, since it is in circulation,
it is only right that you should know it, if only that you may cause it
to be crushed.”
“Yes; please go on.”
“They say—they pretend—they connect your name with—”
“With yours, sir?” She sat upright, with flashing eyes.
“Great heavens, no!” He stared back at her with little less
amazement than her own.
She sank slowly down again, the anger in her face changing to
deepest scorn.
“With whose, then?”
“With the Marquis of Severn’s.”
“What!” She started up again in sheer astonishment. “Who dares? I
have never seen nor spoken to him in my life!”
“Thank God!”
Not till he had heard the denial did the man realize what a burden it
had lifted from his heart; and yet he believed that he loyally loved
this woman.
“Who dares to slander me? Who dares to smirch my name with
falsehoods?” Come what might, he should not go away doubting her.
“It was that man Despencer who told me first.”
“And you listened to him—you, an honorable man, and my friend?”
Hammond bowed his head. He thought he could bear her
reproaches now.
“Go on; you can say nothing to me that I have not said already to
myself. I have been a brute, a fool; I know it. I did give him the lie
once, but his words rankled in my mind, and I could not rest till I
had had the charge disproved.”
“If you are satisfied, go.”
Hammond started and shivered. He had not heard that tone before;
he had not seen that deeply resolute expression, in which Belle’s
face was set like stone.
“Oh, not like this! You will forgive me, Belle? You must! This lie has
tortured me far worse than you.”
He might have made the excuse that he had only repeated the
slander for her sake, and not for the satisfaction of his own doubts.
But he scorned to stoop to subterfuge with her.
“Why should I? Your good opinion or your friendship are nothing to
me any longer.”
“My good opinion—friendship! Ah, it is more than that! You know,
you must know, that I have loved you all the time!”
“So much the worse. For you to speak of love to me is only another
insult.”
“I did not mean to insult you,” was the humble answer. “I meant to
offer you the love that a man offers to his betrothed.”
“Does a man cast suspicions on his betrothed?”
“I have not cast suspicions. My worst fault is to have listened to
those of others. There is no love without jealousy.”
“There is no love without perfect trust. If a man really loves a
woman, does he set himself to doubt her, to gather up the malicious
tattle of her enemies, and carry it to her, like an accusing judge, and
ask her to clear herself? Ah, no! If he loves her, he first crushes the
slander and the enemy together, and then comes to tell her what he
has done.”
“Listen to me.”
“Wait! But I cannot expect to be treated like that. My good name is
of no importance to me; I am public property. There would be
nothing to talk about in the club smoking-rooms if we poor singers
were to be respected. It is natural that we should be bad. And so
you come to me and repeat the accusations which you had not the
courage to despise. And that is your love!”
“I implore you—”
“No! With us poor girls it is different. We have not your prudence
and self-restraint. Where we love we do not ask for references. We
give our hearts without reserve, and from the moment we have
given them, instead of searching for stains on the character of the
man we love, we set ourselves to see only the good in him; we shut
our eyes to the evil; we screen his faults; if others attack him, we
defend him; and if the world casts him out, we cling to him all the
more.”
Her voice sank down and ended in a sob. Hammond clasped his
hands together in despair.
“Why did I ever hesitate? I was a coward. I dreaded the idea of
even a whisper being raised against my wife. Forgive me.”
“And you were right. Yes, I forgive you.”
The answer came softly, and the man’s heart was thrilled to the
core.
“And something more,” he pleaded passionately. “Tell me that you
love me like that.”
Belle slowly, gently shook her head.
“No. Why do you make it so hard for me? Leave me, I entreat you.”
Hammond turned faint.
“You do not love me, then?” he gasped.
She gave him a despairing look, and answered passionately:
“No! I don’t love you—I don’t love you!”
He rose up, without another word, and went away from her. The
next instant, as the door closed behind him, Belle sank down on the
seat, like a flower whose stem is broken, and the tears began to
come like rain.
A door at the far end of the conservatory softly opened, and a man
stepped through and came towards her, with his finger on his lips.
It was the Marquis of Severn.