Читаем C++ Primer Plus полностью

alternative representations, 270

AND (&&), 262

example, 263–265

precedence, 269–270

ranges, 265–267

functor equivalents, 1031–1032

NOT (!), 267–269

OR (||), 260–262

Example, 261–262

logical OR operator (||), 260–262

alternative representations, 270

example, 261–262

precedence, 269

logic_error exception, 918

long data type, 68–70

long double data type, 94–96

long long type, 1153

LONG_MAX constant, 72

LONG_MIN constant, 72

loops, 195

break statement, 280–282

continue statement, 280–282

do while, 231–233

entry-condition loops, 198

for loops

blocks, 212–214

body, 196–197

combination assignment operators, 211–212

comma operator, 214–217

compared to while loops, 227–228

decrement operator (—), 207–211

example, 196–197

expressions, 200–202

factorials, calculating, 203–205

increment operator (++), 207–211

initialization, 196–197

loop test, 196–197

loop updates, 196–198, 205–206

nonexpressions, 202

sequence points, 208–209

side effects, 201, 208–209

step size, 205–206

strings, 206–207

syntax, 197–199

forever loops, 232

nested loops, 244–249

number-reading loops, 283–286

range-based, C++11, 233–234

text input234, cin object, 234–235

cin.get() function, 235–237, 241–244

end-of-file conditions, 237–241

sentinel characters, 234

while loops, 224–227

compared to for loops, 227–228

example, 225–226

syntax, 224

time-delay loops, 229–230

lotto probabilities, calculating, 317–320

lotto.cpp, 319

low-level languages, 11

low-level programming, 1203–1204

lower_bound() function, 1024, 1304, 1309

lower_bound() method, 1021, 1283

lvalue reference, 1162

M

machine language, definition of, 18

Macintosh, C++, 25

macros, compared to inline functions, 382

magval() method, 602

main() function, 29–30

calling, 30

importance of, 32

int main() header, 30–31

make_heap() function, 1305, 1314

malloc() function, 160

mangling names, 418

manip.cpp, 1079

manipulators, 38, 1090–1091

endl, 37–38

iomanip header file, 1091

number base display, 1078–1079

mantissas, 93

manyfrnd.cpp, 865

mapped_type type, 1281, 1284

maps, methods, 1281–1284

math operators, 97. See also arithmetic operators

max() function, 1305, 1316

max() method, 787, 1046

maxsize() method, 1275

max_element() function, 1305, 1317

max_size() method, 1251

mean, harmonic, 896

means() function, 909–914

member dereferencing operators, 1242–1246

member functions. See also constructors

const member functions, 537

constructors, 524, 538–539

calling, 526–527

declaring, 525–526

default constructors, 527–528, 638–639

defining, 525–526

new operator, 659–661, 677–678

copy constructors, 639

deep copying, 642–644

limitations, 640–642

shallow copying, 640

when to use, 639–640

definitions, 509, 514, 516, 523

destructors, 528–529, 538–539

friend member functions, 578–580, 883

compared to friend classes, 886

example, 885–886

forward declaration, 884

shared friends, 888–889

implicit member functions, 637–638

inline functions, 517–518

invoking, 523

object membership, 518

objects, returning, 662–664

const objects, 662–665

non-const objects, 663

private, 513

properties, 777–778

public, 513

qualified names, 514

template classes, list, 1014–1016

this pointer, 539–546

unqualified names, 514

member in-class initialization, 1160

member initializer lists, 683, 715

member templates, 854–855

members, structures, 141

memberwise assignment, 145

memberwise copying, 640

memb_pt.cpp, 1244–1245

memory. See also buffers

allocating

bad_alloc exceptions, 921

new operator, 160–162

automatic storage, 182

cv-qualifiers, 472–474

dynamic, 476–482

dynamic memory allocation, 757

derived class does use new, 758–760

derived class doesn’t use new, 757–758

example, 761–766

free store, 182–183

freezing delete operator, 163–164

function linkage, 474–475

language linking, 475–476

leaks, 183

memory-related methods, 1258

multifile programs, compiling separately, 447–453

named, 160

stack, 458–459

unwinding, 909–914

static storage, 183

storage class specifiers, 472–473

storage duration, 453–454

Перейти на страницу:

Все книги серии Developer's Library

C++ Primer Plus
C++ Primer Plus

C++ Primer Plus is a carefully crafted, complete tutorial on one of the most significant and widely used programming languages today. An accessible and easy-to-use self-study guide, this book is appropriate for both serious students of programming as well as developers already proficient in other languages.The sixth edition of C++ Primer Plus has been updated and expanded to cover the latest developments in C++, including a detailed look at the new C++11 standard.Author and educator Stephen Prata has created an introduction to C++ that is instructive, clear, and insightful. Fundamental programming concepts are explained along with details of the C++ language. Many short, practical examples illustrate just one or two concepts at a time, encouraging readers to master new topics by immediately putting them to use.Review questions and programming exercises at the end of each chapter help readers zero in on the most critical information and digest the most difficult concepts.In C++ Primer Plus, you'll find depth, breadth, and a variety of teaching techniques and tools to enhance your learning:• A new detailed chapter on the changes and additional capabilities introduced in the C++11 standard• Complete, integrated discussion of both basic C language and additional C++ features• Clear guidance about when and why to use a feature• Hands-on learning with concise and simple examples that develop your understanding a concept or two at a time• Hundreds of practical sample programs• Review questions and programming exercises at the end of each chapter to test your understanding• Coverage of generic C++ gives you the greatest possible flexibility• Teaches the ISO standard, including discussions of templates, the Standard Template Library, the string class, exceptions, RTTI, and namespaces

Стивен Прата

Программирование, программы, базы данных

Похожие книги

1С: Бухгалтерия 8 с нуля
1С: Бухгалтерия 8 с нуля

Книга содержит полное описание приемов и методов работы с программой 1С:Бухгалтерия 8. Рассматривается автоматизация всех основных участков бухгалтерии: учет наличных и безналичных денежных средств, основных средств и НМА, прихода и расхода товарно-материальных ценностей, зарплаты, производства. Описано, как вводить исходные данные, заполнять справочники и каталоги, работать с первичными документами, проводить их по учету, формировать разнообразные отчеты, выводить данные на печать, настраивать программу и использовать ее сервисные функции. Каждый урок содержит подробное описание рассматриваемой темы с детальным разбором и иллюстрированием всех этапов.Для широкого круга пользователей.

Алексей Анатольевич Гладкий

Программирование, программы, базы данных / Программное обеспечение / Бухучет и аудит / Финансы и бизнес / Книги по IT / Словари и Энциклопедии
1С: Управление торговлей 8.2
1С: Управление торговлей 8.2

Современные торговые предприятия предлагают своим клиентам широчайший ассортимент товаров, который исчисляется тысячами и десятками тысяч наименований. Причем многие позиции могут реализовываться на разных условиях: предоплата, отсрочка платежи, скидка, наценка, объем партии, и т.д. Клиенты зачастую делятся на категории – VIP-клиент, обычный клиент, постоянный клиент, мелкооптовый клиент, и т.д. Товарные позиции могут комплектоваться и разукомплектовываться, многие товары подлежат обязательной сертификации и гигиеническим исследованиям, некондиционные позиции необходимо списывать, на складах периодически должна проводиться инвентаризация, каждая компания должна иметь свою маркетинговую политику и т.д., вообщем – современное торговое предприятие представляет живой организм, находящийся в постоянном движении.Очевидно, что вся эта кипучая деятельность требует автоматизации. Для решения этой задачи существуют специальные программные средства, и в этой книге мы познакомим вам с самым популярным продуктом, предназначенным для автоматизации деятельности торгового предприятия – «1С Управление торговлей», которое реализовано на новейшей технологической платформе версии 1С 8.2.

Алексей Анатольевич Гладкий

Финансы / Программирование, программы, базы данных