C++ Reserved Keywords

 C++ Reserved Keywords

C++ reserves and gives predefined meanings to the following keywords. You may not redefine keywords or use them for other purposes. Keywords that appear in color are new since C++11.

alignas alignof and and_eq asm auto bitand bitor bool break case catch char char16_t char32_t class compl const const_cast constexpr continue

decitype default delete do double dynamic_cast else enum explicit export extern false float for friend goto if inline int long mutable

namespace new noexcept not not_eq nullptr operator or or_eq private protected public register reinterpret_cast return short signed sizeof static static_assert static_cast

struct switch template this thread_local throw true try typedef typeid typename union unsigned using virtual void volatile wchar_t while xor xor_eq

Operator

* / %

+ -

Meaning

multiply divide modulo

add subtract

Associativity

left left left

left left

Usage

expr * expr expr / expr expr % expr

expr + expr expr - expr

>

bitwise shift right

left

<

less than

left

greater than

left

>=

greater than or equal to

left

==

equal

left

!=

not equal

left

&

bitwise AND

left

^

bitwise EXCLUSIVE OR

left

|

bitwise OR

left

&&

logical AND

left

||

logical OR

left

? :

conditional

left

=

assign

left

*=

multiply and assign

left

/=

divide and assign

left

%=

modulo and assign

left

+=

add and assign

left

-=

subtract and assign

left

=

shift right and assign

left

&=

AND and assign

left

|=

OR and assign

left

^=

EXCLUSIVE OR and assign left

,

comma

left

Typically overloaded for I/O

expr > expr

expr < expr expr expr expr >= expr

expr == expr expr != expr

expr & expr

expr ^ expr

expr | expr

expr && expr

expr || expr

expr ? expr : expr

lvalue = expr lvalue *= expr lvalue /= expr lvalue %= expr lvalue += expr lvalue -= expr lvalue = expr lvalue &= expr lvalue |= expr lvalue ^= expr

expr, expr

Data Abstraction & Problem Solving with C++

WALLS AND MIRRORS SIXTH EDITION

Frank M. Carrano

University of Rhode Island

Timothy Henry

University of Rhode Island

Vice President and Editorial Director, ECS: Marcia J. Horton

Executive Editor: Tracy Johnson Associate Editor: Carole Snyder Director of Marketing: Christy Lesko Marketing Manager: Yez Alayan Marketing Assistant: Jon Bryant Director of Production: Erin Gregg Managing Editor: Jeff Holcomb Associate Managing Editor: Robert Engelhardt Manufacturing Buyer: Lisa McDowell Art Director: Anthony Gemmellaro

Cover Designer: Liz Harasymczuk Permissions Supervisor: Michael Joyce Permissions Administrator: Jenell Forschler Director, Image Asset Services: Annie Atherton Manager, Visual Research: Karen Sanatar Cover Art: Shutterstock/SVLuma Media Project Manager: Renata Butera Full-Service Project Management: Rose Kernan Composition: Cenveo Publisher Services / Nesbitt Printer/Binder: Edwards Brothers Cover Printer: Lehigh-Phoenix Color/Hagerstown

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

Copyright ? 2013, 2007, 2005 Pearson Education, Inc., publishing as Addison-Wesley. All rights reserved. Printed in the United States of America. This publication is protected by Copyright, and permission should be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. To obtain permission(s) to use material from this work, please submit a written request to Pearson Education, Inc., Permissions Department, One Lake Street, Upper Saddle River, New Jersey 07458, or you may fax your request to 201-236-3290.

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

Library of Congress Cataloging-in-Publication Data on file.

10 9 8 7 6 5 4 3 2 1

ISBN 10: 0-13-292372-6 ISBN 13: 978-0-13-292372-9

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download