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

versus vector objects, 188–189

array template class, 187

ArrayDb class, 791

arraynew.cpp, 166

arrayone.cpp, 117

arrays

addresses, 170

array notation, 173

arrays of objects, 546–549

declaring, 546

example, 547–549

initializing, 546

as function arguments, 322–325

const keyword, 327–328

declaring, 116–119

defined, 77, 116

design decisions, 325–326

displaying contents of, 327–328

dynamic arrays, 172–173

creating, 164–165

sample program, 165–167

examples, 328–331

filling, 326–327

function idioms, 331

functions and, 320–321

indexes, 117

initializing, 117–120

in C++11, 120

modifying, 328

naming, 172

one-dimensional arrays, 244

pointer arithmetic, 167–172

pointers, 321–322

ranges, 332–334

static binding, 172

strings, 123–124

initializing, 121

structures, 147–148

subscripts, 117

templates, non-type arguments, 843–845

two-dimensional arrays, 244–249, 337–339

declaring, 244–246

initializing, 246–249

variable arrays, 1329

versus vector objects, 188–189

arraytp.h, 843–844

arrfun1.cpp, 321

arrfun2.cpp, 323

arrfun3.cpp, 328

arrfun4.cpp, 332

arrstruc.cpp, 147–148

ASCII character set, table of, 1225–1229

assert, 1204

assgn_st.cpp, 145

assign() method, 1266, 1278

assignable objects, 1008

assigning

strings, 1266

values to pointers, 171

values to variables, 43

variable values, 43

assignment

string class, 133–134

type conversions, 103–104

assignment methods, 1260

assignment operator (=), 43–44, 644, 767–768, 772–775

compared to equality operator, 218–220

custom definitions, 645–646

enumerator values, setting, 152

enumerators, value ranges, 153

overloading, 652–658

sayings1.cpp, 656

string1.cpp, 653–656

string1.h, 652–653

potential problems, 645

strings, 133–134

structures, 145–146

when to use, 644

assignment operators, combination assignment operators, 211–212

assignment statements, 43–44

assignments, 1172–1173

associative containers, 1018, 1026

methods, 1281–1284

multimap, 1023–1025

set, 1019–1022

associativity, arithmetic operators, 99–100

associativity of operators, 1231

examples, 1234

table of, 1232–1234

asterisk (*), dereferencing operator (*) 155, 159

pointers 171–172

at() method, 1259

atan() function, 348

atan2() function, 348

ATM queue simulation

bank.cpp simulation, 695

Customer class, 694

Queue class

class declaration, 691

public interface, 679

ATM queue simulation, 678

bank.cpp simulation, 694–698

Customer class, 690–691

Queue class

class declaration, 694

design, 679

implementation, 680–682

methods, 682–690

public interface, 680

auto, 370

declarations, 1155

auto declarations, 109

auto keyword, 472

auto ptr, 1158

auto.cpp, 456–457

automatic memory storage, 182

automatic sizing (strings), 966–967

automatic teller machine simulation. See ATM queue simulation

automatic type conversion. See type conversion

automatic variables, 182, 314, 453–457

example, 455–457

initializing, 458

stacks, 458–459

autoptr template, 1333

auto_ptr class, 969, 973–975

versus unique_ptr, 975–977

average() function, 800

B

back insert iterators, 1005–1007

bad() method, 296

bad() stream state method, 1098–1102

badbit stream state, 1097–1102

bad_alloc exceptions, 921

Balance() function, 731

bank.cpp, 695–697

bank.cpp simulation, 694–698

Base 10 notation, 1215

Base 16 notation, 1216

binary equivalents, 1217–1218

Base 2 notation, 1217

hexadecimal equivalents, 1217–1218

Base 8 notation, 1215–1216

base classes

ABCs (abstract base classes), 746–749

ABC philosophy, 756

AcctABC example, 749–751, 754–755

enforcing interface rules with, 757

components, initializing, 798–799

friends, accessing, 801–804

methods, accessing, 800–801

objects, accessing, 801

relationships with derived classes, 718–720

TableTennisPlayer example, 708–710

using declarations, 807–808

virtual, methods, 826

virtual base classes, 815–817

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

Все книги серии 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.

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

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