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

that use n copies of character, 1257

that use parts of arrays, 1254–1255

that use ranges, 1257

string1.cpp, 653–656

string1.h, 653

StringBad class, 628

constructors, 632–633

destructor, 633

strngbad.cpp, 630–631

strngbad.h, 628–629

vegnews.cpp sample program, 633–637

strings

accessing, 1259

accessing with for loops, 206–207

appending, 1265–1266

assigning, 1266

C-style, 120–122

combining with numeric input, 130–131

concatenating, 122

empty lines, 130

failbits, 130

in arrays, 123–124

null characters, 121

passing as arguments, 339–341

pointers, 173–178

returning from functions, 341–343

string input, entering, 124–126

string input, reading with get(), 127–130

string input, reading with getline(), 126–127

comparing, 1263–1265

C-style strings, 220–223

string class strings, 223–224

concatenating, 128, 1266

copying, 1269

erasing, 1267–1268

initializing, 121

input, 1106–1108

input/output, 1269–1270

inserting, 1267

palindromes, 1057

replacing, 1268–1269

searching, 1260

find_first_not_of() method, 1262–1263

find_first_of() method, 1262

find_last_not_of() method, 1263

find_last_of() method, 1262

find() method, 1260–1261

rfind() method, 1261

string access methods, 1259

string class, 131–133, 647, 960, 966, 1249–1250, 1333

append methods, 1265–1266

appending, 133–134

assignment, 133–134

assignment methods, 1260, 1266

assignment operator, overloading, 652–658

automatic sizing, 966–967

bracket notation, 649–651

comparing, 960

comparison members, 648–649

comparison methods, 1263–1265

complex operations, 135–136

concatenation, 133–134

concatenation methods, 1266

constants, 1251

constructors, 952–956, 1253–1257

copy methods, 1269

data methods, 1251–1253

default constructor, 647–648

erase methods, 1267–1268

finding size of, 960

Hangman sample program, 962–965

input, 957–960

input/output, 1269–1270

insertion methods, 1267

memory-related methods, 1258

reading line by line, 136–140

replacement methods, 1268–1269

search methods, 1260–1263

searching, 960–961

static class member functions, 651–652

STL interface, 1038–1039

string access methods, 1259

structures, 144–145

template definition, 1249

types, 1250–1251

string class objects, 353–354

StringBad class, 628

constructors, 632–633

destructor, 633

strngbad.cpp, 630–631

strngbad.h, 628–629

vegnews.cpp sample program, 633–637

swapping, 1269

strings.cpp, 123

strlen() function, 123–124, 136, 177, 306, 632

strngbad.cpp, 630–631

strngbad.h, 629

Stroustrup, Bjarne, 14–15

strout.cpp, 1143

strquote.cpp, 402–403

strtref.cpp, 395

strtype1.cpp, 132

strtype2.cpp, 134

strtype4.cpp, 137

struct keyword, 140

structur.cpp, 142

structure initialization, C++11, 144

structure members, 141

structured programming, 12

structures, 140–142, 343, 346

addresses, passing, 351–353

arrays, 147–148

assignment, 145–146

bit fields, 148

compared to classes, 514

dynamic structures, new operator, 178–180

example, 142–144

nested structures, 682

passing/returning structures, 344–345, 348–351

polar coordinates, 347

rectangular coordinates, 346

reference variables, 394, 397–399

const keyword, 401

return references, 399–400

string class members, 144–145

Student class

contained object interfaces, 792–795

contained objects, initializing, 791

design, 787–788

methods, 793–795

private inheritance, 798, 804–805

base-class components, initializing, 798–799

base-class friends, accessing, 801–804

base-class methods, accessing, 800–801

base-class objects, accessing, 801

sample program, 795–797

studentc.h, 789–790

studentc.cpp, 793

studentc.h, 789–790

studenti.cpp, 802–803

studenti.h, 799

subdivide() function, 360–361

sube() function, 311

subobjects, 797

subroutines. See functions

subscripts, 117

substrings, finding, 1260

find_first_not_of() method, 1262–1263

find_first_of() method, 1262

find_last_not_of() method, 1263

find_last_of() method, 1262

find() method, 1260–1261

rfind() method, 1261

subtraction operator (-), overloading, 574–578

sum_arr() function, 320–322, 325

sum() function, 344–345, 565–567

sum() method, 787, 807, 1046

sumafile.cpp, 294–295

Swap() function, 420–421, 1294, 1297

swap() method, 981, 1269, 1276

swap_ranges() function, 1294, 1297

swapp() function, 389

swapping strings, 1269

swapr() function, 389

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

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

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

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