COPYRIGHTED MATERIAL INDEX. Numbers & Symbols. 16-bit characters, bit characters, 10

Size: px
Start display at page:

Download "COPYRIGHTED MATERIAL INDEX. Numbers & Symbols. 16-bit characters, bit characters, 10"

Transcription

1 INDEX Numbers & Symbols = operator, 12 /\ (backslash character), 7 * (quotation mark), 7 n (escape character), 6, 7 r (carriage return), 7 t (tab), decrement operator, 12 + addition operator, 12 / division operator, 12 ~ in destructors, 180 # in directives, 5 ++ increment operator, 12 % mod operator, 12 * multiplication operator, 12! operator, 11 %= operator, 12 & operator, 12 &= operator, 12 *= operator, 12 += operator, 12 -= operator, 12 /= operator, 12 << operator, 6, 12 = operator, 11 >> operator, 12 >>= operator, 12 ^ operator, 12 ^= operator, 12 operator, 12 = operator, 12 + operator, string class, 51 - subtraction operator, bit characters, bit characters, 10 A abstract base classes, abstract superclasses, 115 abstraction, 122, 211, 212 benefits, 84 classes, 130 design and, 84, 85 design success, 125 interface exposed, 123, 125 versus implementation, 123 reusable code, 129, 130 access specifiers, 145, 146 private, 146 protected, 146 public, 146 accumulate function, , 570 ad hoc comments, 65 adapters containers example, operations, 499, priority_queue, queue, function objects bind2nd( ), 548 std::bind( ), add( ) method, overloading, addition operator (+), 12 addone( ) function, 30 COPYRIGHTED MATERIAL 903

2 aggregation arrays aggregation, reusable code, 132 Agile Methodology, 789 algorithms. See also functions binary_search( ), 566 C++ standard library, 443 callbacks, 544 comparison algorithms, count_if( ), 542 equal_range( ), 566 examples, voter registration audits, extending STL, for_each( ), 562 generate( ), 542 header files, 898 interface, 448 iterator invalidation and, 485 iterators, 551 lower_bound( ), 566 modifying algorithms, copy( ), erase( ), iota( ), 570 move( ), replace( ), reverse( ), 562 transform( ), unique( ), 562 move semantics, 536 non-modifying, search algorithms, numerical processing, 570 operational algorithms, overview, set algorithms, sorting algorithms, STL (standard template library), comparison, 459 heap, 463 modifying, non-modifying, numerical processing, 464 operational, 461 search algorithms, 458 sorting, 462 utility algorithms, 459 upper_bound( ), 566 utility, aliasing, 728 alias templates, 338 type aliases, 297 alignment, curly braces, allocate( ) method, 628 allocation operators, Allocator parameter, 473 Allocator type, 628 allocators, 657 header files, 898 alltrue( ) function, 545 alternation (ECMAScript), 582 alternative function syntax, 23, 338 ambiguity in naming, base classes, 248 analysis and design workflow, 788 anchors (ECMAScript), 582 angle brackets, C++11, 324 anonymous namespaces, 292 API (application programming interface), 88 exposed interface, 124 arguments iterator template arguments, 551 iterators, 532 superclass method, types, operator overloading, 414 type-safe variable-length argument lists, variable-length argument lists, arithmetic function objects, 543 arithmetic operators, 543 increment/decrement, overloading, shorthand operators, unary minus and unary plus, 420 array class, array container, 450 arrays, associative arrays, constant expressions,

3 ASCII (American Standard Code for Information Interchange) bind2nd( ) method deleting, 28 dynamic memory, deleting, types, dynamically allocated, 713 heap, multi-dimensional, of objects, pointers, stack, multi-dimensional, standard C-style arrays, 523 std::array, 20 vector container and, ASCII (American Standard Code for Information Interchange), 575 assert macro, static_assert, assign( ) method, assigning object value to objects, assignment bitwise, 180 disallowing, 188 self-assignment, 186 shallow, 180 assignment compared to copying, assignment operator, 170 declaring, 171 defining, helper routines, 187 initializer-lists, move assignment operator, Spreadsheet class, associative arrays, associative containers, 453, 468 hashmaps as, map constructing, 506 element lookup, 509 element remove, example, insert( ) method, 507 iterators, operator[ ], 508 types, method requirements, multimap element lookup, 512 example, multiset, 516 set, typedefs, unordered, unordered_map, unordered_multimap, 522 unordered_multiset, 522 unordered_set, 522 atomic operations, library, 755 atomic types, attributes, C++11, auditvoterrolls( ) function, 571 auto keyword, 23, 402, 480, 507, 570, 602, 617, 699 templates, auto_ptr, 728 B back references, 583, 587 back_insert_iterator class, bad( ) method, 350 bad_alloc exception, base classes abstract, ambiguity, 248 source code, 239 virtual base, 248 virtual base classes, begin( ) method, 523 behaviors, 110 overriding, 115 bibliography, bidirectional I/O, big-o notation, binary logical operators, overloading, binary operators, 11 binary_search( ) function, 566 bind2nd( ) method,

4 bitset capturing bitset, bitwise operators, example, bitset container, bitwise copying, 180 bitwise function objects, 546 bitwise operators, overloading, bool, vector and, bool( ) conversion operator, 373 bool variable, 10 Boolean expressions, conversion operators, bounded repeats, 583 brackets for deleting arrays, 28 break keyword, 21 buffer overflow errors, 736 buffered streams, 346, 349 buffers, packet buffers, bugs avoiding, catastrophic bugs, 828 cosmetic bugs, 828 debug traces, error logging, inheritance, 218 noncatastrophic bugs, 828 planning for, reproducing, debugging nonreproducible, debugging reproduced, 843 root cause, 828 built-in classes, vectors, 476 business modeling workflow, 788 C C++ as object-oriented language, Stroustrup, Bjarne, 4 C++ design abstraction, differences, reuse, C standard library, C++ Standard Library, 443 compile-time rational arithmetic, 446 exceptions, 446 header files, algorithms, 898 allocators, 898 containers, exceptions, 899 general utilities, I/O streams, 900 iterators, 898 mathematical utilities, 899 threading library, 901 I/O streams, 445 localization, 445 mathematical utilities, random numbers, 447 regular expressions, 445 smart pointers, 446 STL (standard template library), containers, strings, 445 time utilities, 447 tuples, 447 C++11, 303 angle brackets, 324 attributes, containers, changes, conversion operators, emplace operations, 484 function syntax, 303 initialization, uniform, initializer lists, 305 literals, user-defined, cache invalidation, 809 caching, design-level efficiency, callbacks, 531 predicate function callbacks, calling copy constructors, explicitly, 164 calling methods, from methods, call_once( ), 763 capitalization in naming, 70 capture blocks, lambda expressions, 537 capture groups, 583 capturing,

5 cascading if statement code cascading if statement, 16 casting downcasting, pointers, upcasting, 235 casting variables, 10 casts const_cast, 29 dynamic_cast, reinterpret_cast, situations for use, 301 static_cast, catastrophic bugs, 828 catch statements, , 404 catching exceptions, 30 31, 370, multiple, stack unwinding and, cbegin( ) method, cend( ) method, chaining constructors, 230 char exception, 377 char variable, 10 char16_t variable, 10 char32_t variable, 10 character classes, 584 character sets encodings, 577 matches, non-western, UCS (Universal Character Set), 77 wide characters, word boundaries, 586 characters, 10 code points, 577 chess program, Chrono library clocks, duration, time_point class, class templates, 317 friend function templates, grid classes, partial class specialization, writing, classes abstraction, 130 access specifiers, array, back_insert_iterator, base classes abstract, virtual, 248 built-in, vectors, 476 character classes, 584 condition_variable, data members, 34 access, 148 declaring, definitions, derived, 218 DoubleSpreadsheetCell, 239 duration, enumerated types, 201 exception, writing, exending, friends, fstream, generic template class, 133 hierarchies, diamond-shaped, 248 clear( ) method, 668 clients, inheritance and, extending classes, clocks, code compiling, 5 decomposing, 22 reusable advantages, 89 design, ease of use, generality, writing, 86 reusing C standard library, capabilities, categories of available code, 87 disadvantages, frameworks,

6 code constructors code (continued) libraries, 88 licensing, 94 limitations, open source libraries, performance, platform limitations, 94 polymorphism and, 116 prototype, 95 stand-alone functions/classes, 87 strategies, support, 94 third-party application bundles, code points, 577 coding, templates, coding without, coercing variables, 10 comments, 4 5 code reuse design, 138 C-style, 4 5 reasons for complicated code explanation, metainformation conveyance, usage explanation, style ad hoc, 65 every line, fixed-format, prefix comments, 64 self-documenting, 66 comparison algorithms, 459, comparison function objects, comparison operators, overloading, comparisons, vectors, 477 compiler, template processing, 322 compiler-generated constructors, compiler-generated default constructors, compile-time debug mode, compile-time rational arithmetic, 446 compiling code, 5 components, 109 condition variables, conditional operators, conditionals conditional operators, if/else statements, 16 switch statements, 16 ternary operator, 17 condition_variable class, configuration management workflow, 788 const characters, string literals and, 50 const data members, const iterator, 649 const keyword methods, 289 parameters, 32, 287 pointers, references, variables, 287 constants, 71 const keyword, 32 namespaced, 70 const_cast, 298 constexpr keyword, constructor inheritance, constructors, 35 chaining, 230 compiler-generated, copy constructors, calling explicitly, 164 subclasses, default, compiler-generated, explicity defaulted, 159 explicity deleted, 160 delegating, 156 delegating constructors, DoubleSpreadsheetCell constructor, 241 error handling, function-try-blocks, hashmap class, , on heap, initializer-list constructors, move constructors,

7 containers c_str( ) method multiple, parent constructors, on stack, 154 vectors, writing, zero-initialization, 476 containers, adapters, 468 queue, associative, 368, 504 map, multimap, multiset, 516 set, bitset, 524 bitwise operators, example, C++ standard library, 443 C++11 changes, forward_list, forward interators, 450 hash tables, 468 header files, 898 interface, 449 methods, reversible, 658 sequential, 468 array class, deque, 491 forward_list, hashmap, list, vector, standard C-style arrays, 524 STL (standard template library), array, 450 bitset, deque, 50 forward_list, 450 hash tables, 453 list container, 340 map, multimap, multiset, 452 priority_queue, 451 set, 452 stack, table listing, unordered associative containers, 453 vector, streams, 524 strings, 524 typedefs, 648 vector, writing, hashmap, continue keyword, 21 conversion implicit, numeric, operators C++, 11 conversion operators ambiguity, bool( ), 373 Boolean expressions, writing, copy( ) function, copy constructors, assignment comparison, calling explicitly, 164 ctor-initializers, 163 helper routines, 187 object members and, Spreadsheet class, declaration, 185 subclasses, copy_backward( ) function, 558 copying bitwise, 180 shallow, 180 copystring( ) function, core process workflows, 788 cosmetic bugs, 828 counters naming conventions, 69 static data members, 189 count_if( ) algorithm, 542, 602 cout stream, 348 covariant return types, 248 CPUs, 742 cruft, 67 c_str( ) method,

8 C-style arrays design C-style arrays, 524 C-style comments, 4 5 C-style strings, 30, 47 ctor-initializers, 144, copy constructors, 163 data member initialization, curly braces, alignment and, D dangling pointers, 182, 446, 739 data members, 34 access, 148 ambiguity, 247 const, const reference data members, const reference members, mutable, 95 reference data members, reference members, references, 276 static, , 291 accessing, methods, d-char-sequence, 55 deadlocks, deallocate( ) method, 628 deallocation operators, debug mode compile-time, ring buffers, run-time, 835 start-time, debugging article citation example, debug traces, debug mode, Fundamental Law of Debugging, 828 introduction, 827 Linux, GDB debugger, memory class-related errors, 848 error categories, general errors, object errors, 848 multithreaded programs, reproducing bugs, debugging nonreproducible, debugging reproduced, 843 symbolic debugger, 843 Visual C debugger, declarations, 5 assignment operators, 171 classes, forward declaration, 191 functions, 22 methods, order, pointers, 26 declaring variables, 9 decltype keyword, 689 decltype keyword, templates, decltype variable, 10 decomposing code, 22 decomposition, modular, 67 refactoring, 67 decrement( ) method, decrement operator ( ), 12 decrement operators, overloading, deduction rules, 684 default constructors, compiler-generated, explicity defaulted, 165 explicity deleted, 160 default parameters, 197 #define directive, 5 definitions, 5 classes, delegating constructors, 156, delete keyword, delete-expression, 436 demote( ) method, 39 deployment workflow, 788 deque container, 450, 491 dereferencing operators, dereferencing pointers, 26, 719 derived classes, 218 design. See also C++ design; programming design; software design 910

9 design patterns dynamic-length vectors abstraction and, chess program, reusable code, abstraction, aggregation, 132 checks and safeguards, 134 class hierarchies, 131 comments, 138 documentation, 138 interfaces, separate concepts, subsystems, templates, user interface dependencies, 132 threading, design patterns, 98 design techniques, 98 classes, template, writing, double dispatch, throwing/catching exceptions, 370 design-level efficiency, 802 caching, object pools, destination ranges, 556 destructors, error handling and, freeing memory, 180 ifstream, 362 ofstream, 362 vectors, virtual, 232 method templates, 330 diamond-shaped hierarchies, 248 directives preprocessor, 5 6 using, 8 distributions, random numbers, division operator (/), 12 DLL (Dynamic Link Libraries), 296 documentation code reuse design, 138 comments reasons for, styles, double deletion, 739 smart pointers, double precision numbers, 10 double variable, 10 double-checked locking algorithm, doubledelete( ) function, double-ended queue. See deque container double-freeing, 446 DoubleSpreadsheetCell class, 239 constructor, 241 DoubleSpreadsheetCell constructor, 241 doubletostring( ) method, 193 doubly linked list structures, 450 do/while loop, 21 downcasting, doworkinthread( ) function, 753 dumb pointers, memory allocation results, 739 duration class, dynamic arrays versus dynamically allocated arrays, 713 dynamic memory, 707 advantages, 708 allocation, delete keyword, failure, 711 malloc( ) function, new keyword, arrays, deleting, multi-dimensional, types, freeing, 180 mental model, pointers, dynamic strings C-style strings, raw string literals, string class, string literals, 50 dynamically allocated arrays, 713 dynamic_cast, dynamic-length vectors,

10 ease of use exception handling E ease of use, ECMAScript, 582 alternation, 582 anchors, 582 back references, 587 character sets, matches, grouping, 583 precedence, 584 raw string literals, regular expressions, repetition, 583 wildcards, 582 word boundaries, 586 efficiency, design-level, 802, 808 caching, object pools, language-level, 802, catching exceptions by reference, 806 move semantics, 806 pass-by-reference, return by reference, 805 temporary objects, elements list container, map associative container, multimap associative container, 512 objects, fields, 479 requirements, value semantics, vectors access methods, appending to, initial value, user-defined classes, 476 emplace( ) method, 499 emplace operations, hashmap class, employee records system sample program Database class Database.cpp file, Database.h file, DatabaseTest.cpp file, 44 Employee class Employee.cpp file, Employee.h file, EmployeeTest.cpp file, 41 user interface, UserInterface.cpp file, empty( ) function, 548 emulation, function partial specialization, enable_if, end( ) method, 524 #endif directive, 6 endl manipulator, 351 end-of-file, 357 end-of-line sequence, 6 enumerated types, in classes, 201 strongly typed enumerations, type-safe, eof( ) method, equal( ) function, equal_range( ) function, 566 erase( ) function, erase( ) method, 514 error categories, error checking, 470 error handling, 104 constructors, function-try-blocks, destructors, exceptions, input, memory allocation errors, new handler callback function, 399 output, 350 error level, debugging, 831 error logging, ErrorCorrelator, 503 escape character, n, 7 event objects, 767 exception classes, writing, exception handling, 376 unexpected_handler, 384 unhandled exceptions,

11 exception_ptr formatting exception_ptr, exceptions, 30 31, , 470 bad_alloc, benefits, C++, C++ standard library, 446 catching, 370, multiple, by reference, 806 stack unwinding and, char, 377 class hierarchy and, custom, 72 header files, 899 hierarchy, introduction, 369 invalid_argument, 374 lambda expressions, 536 matching, 380 multithreaded programming, nested, nested_exception mixin class, polymorphism and, runtime_error, 380 specifications, throw lists, throwing, 370, multiple, stack unwinding and, types, unexpected, 383 unhandled, execution order of operators, 13 explicitly calling copy constructors, 164 explicitly defaulted constructors, 159 exposed interface, API (application programming interface), 124 audience considerations, 123 subsystem interface, 124 utility classes versus libraries, 124 expressions regular expressions, 445, short-circuit logic, 18 extending, 114 classes, inheritance and, extending classes, extern keyword, external linkage, 291, extraction operators, overloading, F facets, factorials at compile time, 696 fail( ) method, 350 feature creep, 782 file streams, ifstream destructor, 362 ofstream destructor, 362 seek( ) method, tell( ) method, files header files, objects, linking, 5 FILO (first-in, last-out), 451 final keyword, 221 find( ) algorithm, find( ) function, , reverse_iterator, 629 Find( ) function, template, find_all( ) algorithm, findelement( ) method, 641 find_if( ) function, , 546 fixed-format comments, fixed-length arrays, vectors, fixed-length vectors, float variable, 10 floating-point numbers, 10 flush( ) method, 349, 366 flush-on-access, for loop, 21 range-based, 21 22, for_each( ) function, 562, formatting alignment, curly braces, parentheses, 74 spaces, 74 tabs,

12 forward declaration functions forward declaration, 191 forward_list container, 450, forward iterators, 450 frameworks code reuse, 88 free software, 96 freeing memory, destructors and, 180 friend function templates to class templates, friend keyword, friends, fstream class, func( ) method, 386 function adapters, binders bind2nd( ), 548 std::bind( ), function objects, 428, 531, 542 adapters, binders, adapting functions, 549 arithmetic function objects, 543 bitwise function objects, 546 comparison function objects, logical function objects, 545 member functions, negators, 548 threads, writing, function pointers, implementing, threads, typedefs, function templates, overloading, specialization, functional relationships, functionality adding, 115 replacing, 115 required, user interface, function-call operator, functions, 22 23, 316. See also algorithms accumulate, 570 addone( ), 30 alltrue( ), 545 alternative function syntax, 338, auditvoterrolls( ), 571 binary_search( ), 566 C++11 syntax, 303 callbacks, predicate function callbacks, copy_backward( ), 558 copystring( ), as data, declarations, 22 doubledelete( ), doworkinthread( ), 753 empty( ), 548 equal( ), equal_range( ), 566 Find( ), find( ), , find_all( ), find_if( ), for_each( ), friends, functwo( ), 395 getduplicates( ), hash functions, includes( ), incr( ), 281 lexicographal_compare( ), lower_bound( ), 566 main( ), 6 make_move_iterator( ), 633 malloc( ), malloc_int( ), 730 max( ), 482 mem_fn( ), min( ), 482 minmax( ), 482 mismatch( ), namespaces and, 7 8 operator( ), parameters, 22 partial specialization, overloading and, printvector( ), 482 procedures and,

13 function-try-blocks header files process( ), processvalues( ), 692 prototypes, 22 random_shuffle( ), 460 readname( ), 354 realloc( ), 713 sizeof( ), 49 sort( ), stand-alone, reuse and, 87 static, 292 strcat( ), 49 strcopy( ), 48 strlen( ), swap( ), 482, 647 testcallback( ), 541 threadfunc( ), 753 throw_with_nested( ), 393 unexpected( ), 384 upper_bound( ), 566 function-try-blocks, functors, 428 functwo( ) function, 395 Fundamental Law of Debugging, 828 futures, G garbage collection, 724 GDB debugger, generality, generate( ) algorithm, 542 generating random numbers, random number engines, predefined, 616 generic programming, 444 reusable code and, 316 templates and, 316 generic template class, 133 get( ) method, getduplicates( ) function, getline( ) method, 357 getsize( ) method, 359 getstring( ) method, 240 renaming, 195 getters/setters, 70 getvalue( ) method, 145 renaming, 195 global functions, operators, GNU project, 96 good( ) method, 350, GPL (GNU Public License), 96 gprof, graphics cards, cores, greedy repeats, 583 grouping (ECMAScript), 583 H handles, 129 has-a relationship, is-a relationship comparison, hash functions, , 636, hash tables, 68, 453, , 636. See also unordered associative containers unordered_map, hash_map, implementation, 637 hashmap class accessor operations, as associative container, clear operation, 668 constructor, , emplace operations, erase operations, implementation, initializer list assignment operator, initializer list constructor, 664 insertion operations, 665 interface, sequential containers, as STL container, template demonstration, templates, typedefs, header files, algorithms, 898 allocators, 898 containers, exceptions, 899 general utilities, interators,

14 header files inheritance header files (continued) I/O streams, 900 mathematical utilities, 899 template definitions, threading library, 901 heap, 25 constructors on, objects on, vector allocation, 476 heap algorithms, 463 heap arrays, multi-dimensional, Hello, World arrays, std::array, 20 comments, 4 5 conditionals conditional operators, if/else statements, 16 switch statements, ternary operator, 17 functions, I/O streams, 6 7 loops for, 21 do/while, 21 while, main( ) function, 6 namespaces, 7 8 operators, preprocessor directives, 5 6 types enumerated, structs, 15 variables, 9 10 helper methods, 149 helper routines assignment operator, 187 copy constructors, 187 hierarchies, classes, exceptions, diamond shaped, 242 exceptions, parallel, 249 reusable code and, 131 homogenous elements, 447 Hungarian Notation, I #ifdef directive, 6 if/else statements, 16 cascading if statement, 16 #ifndef directive, 6 ifstream destructor, 362 ifstream object, bool( ) conversion operator, 373 implementation, implementation class, implementation workflow, 788 versus interface, 1213 implicit conversion, In-class member initializers, 167 #include directive, 5 includes, preprocessor directives, 6 includes( ) function, incr( ) function, 281 increment( ) method, increment operator (++), 12 overloading, indexing, iterators and, 481 inheritance, 114, bug fixes and, 218 clients and, extending classes, constructors, derived classes, 218 functionality adding, 115 replacing, 115 multiple, , uses, non-public, 270 parent classes, 218 pointers, 225 polymorphism, spreadsheet, preventing, 221 properties, 115 replacing,

15 initialization iterators reuse subclasses and, WeatherPrediction class, specialization comparison, 337 subclasses, superclasses, 218 templates comparison, initialization constructors, (See also ctorinitializers) in-class member initializers, 167 lists (C++11), 305 nonlocal variables, 294 references, 274 uniform in C++, 303, , 476 zero-initialization, template types, initializer_list, 476 initializer-list constructors, assignment operators, hashmap class, 664 inline keyword, inline methods, in-memory streams, input error handling, locale awareness, 359 manipulators, objects, streams, get( ) method, getline( ), 357 peek( ), putback( ), 356 readname( ) function, 354 unget( ), input stream iterator, 630 inrange( ) method, 178 insert( ) method, map associative container, 507 insert iterators, insertion operators, overloading, insert_iterator class, 631, instantiation, 133, 321 selective, 325 int variable, 9 integer non-type parameters, integers, 9 enumerated types, interface, 211, 212 algorithms, 449 API (Application Programming Interface), 124 containers, 449 exposed, audience considerations, 123 subsystem interface, 124 utility classes versus libraries, 124 versus implementation, 123 implementation class, interface class, usability, interface class, internal linkage, interviews, intvector, 476 invalid_argument exception, 374 invalidation of iterators, 485 I/O bidirectional, overview, streams, 6 7, 445 header files, 900 user input, 7 ios_base::out, 362 iostream subclass, is-a relationship, has-a relationship comparison, polymorphism, 116 iterative processes, iterator adapters (STL) insert iterators, move iterators, reverse iterators, stream iterators, iterators, 457, arguments, 532 categories, 471 const, 649 generate( ) algorithm,

16 iterators libraries iterators (continued) header files, 898 indexing and, 481 input stream iterator, 630 invalidation, 485 list container, 492 map associative container, methods, operations, 481 output stream iterator, 630 regular expressions, 588 safety, template arguments, 551 traits, typedefs, , types, 551 vector, writing, iterator_traits class, K keywords auto, 23, 339, 402, 570, 602, , 699 break, 21 const, 32, 191, methods, 289 parameters, 32, 287 pointers, references, variables, 287 constexpr, continue, 21 decltype, delete, extern, final, 221 friend, inline, new, noexcept, override, static L functions, variables, throw, 374 typename, 641 using, 253 virtual, 222 lambda expressions capture block, 537 as parameters, 541 return types, syntax, threading, 750 language-level efficiency, 802, catching exceptions by reference, 806 move semantics, 806 pass-by-reference, return by reference, 805 temporary objects, lexicographical_compare( ) function, libraries. See also C++ standard library atomic operations, 755 C standard library, Chrono clocks, duration, time_point class, code reuse, 88 library handles, 296 open source, finding, using, Ratio, regex, regex_iterator( ), regex_match( ), regex_replace( ), regex_search( ), regex_token_iterator( ), regular expressions library, 75 standard library, 36 classes,

17 life cycles of objects mark and sweep garbage collection life cycles of objects, 152 assigning to objects, creation, destruction, LIFO (last-in, first-out), 451 linear_congruential_engine, 615 linkage doubly linked list structures, 350 external, 291, internal, static, 291 static keyword, linking object files, 5 streams, Linux, GDB debugger, list container, 450 forward_list comparison, list container, elements accessing, 492 adding/removing, 492 enrollment, iterators, 492 merge( ) method, 494 remove( ) method, 494 remove_if( ) method, 494 reverse( ) method, 494 size, 492 sort( ) method, 494 special operations, unique( ) method, 494 literals, 11 literal pooling, 50 string literals, 50 localizing, 576 raw string literals, 54 55, user-defined, C++11, locales, 579 classic, 580 input and, 359 Windows, 579 localization, 445, string literals, 576 lock classes, locks double-checked locking algorithm, multithreading, log( ) method, log level debugging, 831 Logger::log( ) method, 832 logical function objects, 545 long double variable, 10 long long variable, 9 long variable, 9 longjmp( ), 371 loops do/while loop, 21 for loop, 21 range-based, loop unrolling, while loop, lower_bound( ) function, 566 M macros, preprocessor macros, main( ) function, 6 make_move_iterator( ) function, 633 make_pair( ) template, 505 make_shared( ) method, 731 malloc( ) function, malloc_int( ) function, 730 map associative container constructing, 506 elements insert( ) method, 507 lookup, 509 removing, example, iterators, operator[ ], 508 types, 506 unordered_map comparison, map container, 452 mark and sweep garbage collection,

18 mathematical utilities methods mathematical utilities, header files, 899 Matrix class, max( ) function, 482 member functions, threads, 751 members, 145 pointers to, 727 mem_fn( ) function, memory aliasing, 728 allocation contiguous pieces, 712 dumb pointers, 729 failure behavior, null pointers, 398 vectors, allocation errors, class-related errors, 848 double deletion, 739 dynamic, 707 advantages, 708 allocation, , arrays, 713 mental model, multi-dimensional arrays, pointers, errors, categories, freeing, destructors and, 180 function pointers, garbage collection, 724 general errors, heap, 25 object errors, 848 object pools, 725 orphaned, 184 out-of-bounds access, pointer arithmetic, pointers, 718 smart pointers, stack, 25 strings, underallocating, memory access errors, memory freeing errors, memory leaks, 446, Linux, Valgrind, Windows, memory management, custom, merge( ) method, 494 Mersenne twister, 615 metaprogramming. See template metaprogramming method calls, 136 method templates, non-type parameters, methods, 145 add( ), overloading, allocate( ), 628 assign( ), associative containers, bad( ), 350 begin( ), 523 bind2nd( ), 548 calling from methods, cbegin( ), cend( ), clear( ), 668 const, const keyword, 289 constructors, 35 containers, c_str( ), deallocate( ), 628 declarations, ordering, decrement( ), defining, demote( ), 39 doubletostring( ), 193 emplace( ), 499 end( ), 523 eof( ), 358 erase( ), 514 fail( ), 350 findelement( ), 641 flush( ), 349, 366 func( ), 386 get( ),

19 MFC (Microsoft Foundation Classes) moving ownership getsize( ), 359 getstring( ), 195, 240 getvalue( ), 145, 195 good( ), 350, 358 helper methods, 149 increment( ), inline, inrange( ), 178 insert( ), 507 iterators, log( ), Logger::log( ), 832 make_shared( ), 731 multi, 973 namespaces and, 7 8 output, raw output methods, 349 overloaded add( ), deleting, 196 operator+ method, overloading, overriding, changing parameters, changing return type, clients and, overloaded superclass method, preventing, 225 private superclass method, static methods, superclass method access level, superclass method arguments, throw list, virtual, pointers to, 727 promote( ), 39 pure virtual methods, push( ), 4499 push_back( ), 475 put( ), 349 rbegin( ), 629, 658 refcall( ), rend( ), 629, 658 set( ), 196 setvalue( ), 145 static, 193, 291 stringtodouble( ), 193 tie( ), virtual, 222 pure, wait( ), 768 what( ), 340, 350 write( ), 349 MFC (Microsoft Foundation Classes), 88 min( ) function, 482 minmax( ) function, 482 mismatch( ) function, mixin, 122 variadic templates, mixin classes, 122 variadic templates, mod operator (%), 12 modifying algorithms, , copy( ), 558 erase( ), iota( ), 570 move( ), replace( ), reverse( ), 562 transform( ), unique( ), 562 modular decomposition, 67 move( ) function, move assignment operator, , 419 move constructor, move iterators, 632 move semantics, algorithms, 536 language-level efficiency and, 806 move iterators, MoveableClass instances, 633 move_backward( ) function, moving ownership,

20 multi-dimensional arrays, dynamic memory nothrow multi-dimensional arrays, dynamic memory, multiline comments, 4 multimap container, 452 element lookup, 512 example, multiple inheritance, , uses, multiplication operator (*), 12 multiset associative container, 516 multithreaded programming, 741 cancelling threads, 752 condition variables, deadlocks, debugging, exceptions, futures, introduction, lambda expression, 750 locks, logger class example, member functions, 751 mutual exclusion, mutex classes, race conditions, results retrieval, 752 std::call_once( ), thread local storage, 751 thread pools, threading design, threads function object, function pointers, multithreading threading models, 101 mutability, lambda expressions, 537 mutable data members, 195 mutex classes, timed, writing to streams, mutual exclusion, mutex classes, MVC (Model-View-Controller), 99 object-oriented frameworks, 132 MyEnum, N namespaces, 7 8 anonymous, 292 functions, 7 8 methods, 7 8 namespaced constants, 70 naming ambiguity, base classes, 248 conventions capitalization, 70 counters, 69 Hungarian Notation, namespaced constants, 70 prefixes, 69 getters, 70 selecting, setters, 70 narrowing, uniform initialization, 304 N-dimensional grids, template recursion and, negators, 548 nested classes, nested exceptions, nested_exception mixin class, new keyword, new-expression, 436 NGrid template class, noexcept keyword, noncatastrophic bugs, 828 non-integral array indices, nonlocal variables, order of initialization, 294 non-modifying alorigthms, search algorithms, non-public inheritance, 270 nonstandard strings, 30 non-type template parameters, , method templates, pointers, 679 reference, 679 non-western character sets, nothrow,

21 null pointers operator overloading null pointers dereferencing, 26 memory allocation routines, 398 numbers, rational, 604 numeric conversion, numerical processing algorithms, 464, 570 O object pools, 725 design-level efficiency, object-oriented languages C++ as, philosophy behaviors, 110 classes, components, 109 properties, 109 objects, , 316 aggregation, arrays of, constructors, writing, elements, fields, 479 even objects, 767 files, linking, 5 function objects, 448, 531 adapters, adapting functions, 549 arithmetic function objects, 543 comparison function objects, logical function objects, 545 member functions, negators, 548 writing, on heap, inheritance, multiple, input, life cycles, 152 assigning to objects, creation, destruction, memory, dynamic allocation, output, passing by reference, relationships has-a, , hierarchies, is-a, mixin classes, 122 not-a, as return values, on stack, 151 destruction, 169 out of scope, 169 temporary, ofstream destructor, 362 OOP (object-oriented programming), 34 opaque classes, 129 open source libraries, finding, using, operational algorithms, 461, operator*, operator->, operator->*, 432 operator[ ], map associative container, 508 operator( ) function, operator delete, 437 overloading, operator+ method, global, operator new, 437 overoading, operator overloading, 136, , , 649 add( ) method, allocation/deallocation operators, argument types, 414 arithmetic, increment/decrement, shorthand operators, unary minus and unary plus, 420 behavior choices, 415 binary logical operators, bitwise operators, comparison,

22 operator overloading overloading operator overloading (continued) dereferencing operators, extraction operators, function-call operator, implementing overloaded, 243 insertion operators, limitations, methods versus global functions, operator delete, operator+ method, global, overloadable operators, placement new, 437 reasons for, 412 return types, subscripting operator, non-integral array indices, read-only access, type building, 211 use, 136 operators %=, 12 &, 12 &=, 12 *=, 12 +=, 12 -=, 12 /=, 12 <<, 12 <<=, 12 >>, 12 >>=, 12 ^, 12 ^=, 12, 12 =, 12 arithmetic, 543 arity, 412 assignment operator, 170 declaring, 171 defining, move assignment operator, Spreadsheet class, associativity, 413 binary, 11 bitwise, conditional, conversion ambiguity, bool( ), 373 Boolean expressions, C++11, writing, dereferencing, execution order, 13 function-call, global functions, overloading, placement new, 437 precedence, 413 relational, scope resolution, 147 sequencing operator, 415 string class, ternary, 11, 17 unary, 11 orphaned memory, 184 ostream_iterator class, 630 out scope (objects on stack), 169 output error handling, 350 manipulators, objects, overview, raw output methods, 349 standard output, 348 streams, buffered, 349 flush( ) method, 349 put( ) method, 349 write( ) method, 349 output stream iterator, 630 overload resolution, 196 overloading function partial specialization and, function templates, methods,

23 overloading operators parent destructors deleting overloaded, 196 operator+ method, operator+ method (global), operators arithmetic, implementing overloaded, 243 superclass method, overloading operators, 136, , allocation/deallocation operators, argument types, 414 arithmetic operators increment/decrement, unary minus and unary plus, 420 behavior choices, 415 binary logical operators, bitwise operators, comparison operators, dereferencing operators, extraction operators, function-call operator, insertion operators, limitations, operator delete, operators not to overload, 415 overloadable operators, placement new, 437 reasons for, 412 return types, subscripting operator, non-integral array indices, read-only access, type building, 211 use, 136 override keyword, 252 overriding behaviors, 115 methods, changing parameters, changing return type, clients and, overloaded superclass method, P preventing, 225 private superclass method, static methods, superclass method access level, superclass method arguments, syntax, 223 throw list, virtual, what( ), 340 packets, buffers, pair class, parallel hierarchies, 249 parameter packs, 694 parameters, 316 Allocator, 473 const keyword, 287 const keyword and, 32 const reference parameters, default, 197 functions, 22 lambda expressions, 536, 541 overridden methods, references, , template template parameters, templates, 316 integer non-type parameters, method templates, non-type parameters, , parameter packs, 694 type parameters, vector, 473 parent classes, 218 parent constructors, private, 270 protected, 270 references, parent constructors, parent destructors,

24 parenthese in code programming parenthese in code, 74 partial specialization classes, functions, pass-by-reference, efficiency, passing objects, by reference, by value, disallowing, 188 variables by reference, 27 by value, 27 pattern-matching, 445 patterns. See design patterns subsitution pattern, 582 peek( ) method, performance, reuse and, placement new operators, 437 pointer arithmetic, pointers, 718 arrays, casting and, const keyword, dangling, 182, 446, 739 declaring, 26 dereferencing, 26, 719 dynamic memory, function pointers, threads, inheritance and, 225 to members, 727 mental model, to methods, 727 non-type template parameters, 679 to references, versus references, 71 72, references from, 277 references to, smart pointers, 28 29, auto_ptr, 728 C++ standard library, 446 class writing, reference counting, shared_ptr, stack unwinding and, 396 unique_ptr, weak_ptr, 734 structures, 27 this, typedefs, variables, 27 polymorphism, 116 exceptions and, inheritance, spreadsheet, SpreadsheetCell hierarchy, POSIX, initializing semaphores, 371 #pragma directive, 6 precedence, ECMAScript, 584 precision numbers, double precision numbers, 10 predicate function callbacks, prefix comments, 64 preprocessor directives, 5 6 #define, 5 #endif, 6 #ifdef, 6 #ifndef, 6 #include, 5 includes, 6 #pragma, 6 preprocessor macros, printf( ), 345 printing, tuples, printvector( ) function, 482 priority_queue container adapter, example, operations, private, superclasses, procedures, 316 functions and, 108 process( ) function, processvalues( ) function, 692 profiling, gprof example, Visual C example, programming generic, 444 multithreaded (See multithreaded programming) 926

25 programming design regex library programming design, 80 importance of, programs, employee records sample program, promote( ) method, 39 properties, 109 inheritance and, 115 replacing, 115 protected methods, inheritance, 220 public methods, inheritance, 220 pure virtual methods, push( ) method, 499 push_back( ) method, 475, put( ) method, 349 putback( ) method, 356 Q queue container adapter example, operations, 499 queue container adapter, R race conditions, random number engine adapter, 447, random number engines, 447, linear_congruential_engine, 615 Mersenne twister, 615 predefined, 616 subtract_with_carry_engine, 615 random numbers C++ standard library, 447 distribution, generating, random_device engine, random_shuffle( ) function, 460 range specification, 584 range-based for loop, ranges destination, source, 556 Ratio library, rational numbers, 604 raw output methods, 349 raw string literals, rbegin( ) method, 629, 658 r-char-sequence, 55 readname( ) function, 354 read-only access, realloc( ) function, 713 recursion, templates, refactoring, decomposition and, 67 refcall( ) method, reference counting smart pointers, reference data members, const reference data members, reference parameters, const, 32 references, back references, 583, 587 const keyword, data members, 276 initializing, 274 modifying, 275 non-type template parameters, 679 parameters, parent classes, passing objects by, passing variables by, 27, 277 from pointers, 277 to pointers, versus pointers, 71 72, pointers to, reference variables, return values, 278 rvalue, unnamed values, 274 regex library, regex_iterator, regex_iterator( ), regex_match( ), regex_replace( ), regex_search( ), regex_token_iterator( ), typedefs,

26 regular expressions rvalue references regular expressions, 445, ECMAScript, iterators, 588 raw string literals, regex library, regular expressions library, 575 reinterpret_cast, relational operators, relationships functional, has-a, , hierarchies, inheritance, multiple, is-a, , 116=119 mixin classes, 122 not-a, remove( ) method, 494 remove-erase-idiom, 482, remove_if( ) method, 494 rend( ) method, 629, 658 repeats, greedy, 583 repetition (ECMAScript), 583 replace( ) function, replace operations, 583 required functionality, user interface, requirements on elements, requirements workflow, 788 return by reference, 805 return types lambda expressions, operator overloading, return values objects as, references, 278 returning values, reusable code abstraction, aggregation, 132 checks and safeguards, 134 class hierarchies, 131 comments, 138 design, documentation, 138 ease of use, generality, generic programming, 316 interfaces, usability, separate concepts, subsystems, templates, user interface dependencies, 132 reusable code and, 131 reuse advantages, C standard library, capabilities, categories of available code, 87 disadvantages, frameworks, 88 ideas, 87 inheritance and subclasses and, WeatherPrediction class, libraries, 88 open source, licensing, 94 limitations, performance and, philosophy, platform limitations, 94 prototype, 95 stand-alone functions/classes, 87 strategies, 90 95, 127 support, 94 third-party application bundles, writing reusable code, 86 reverse( ) functions, 62, 494 reverse iterators, reverse_iterator class, 629, reversible containers, 658 ring buffers, round-robin scheduling with vector, RTTI (Run Time Type Information), run-time debug mode, 835 runtime_error exception, 380 RUP (Rational Unified Process) of software development, rvalue references, move assignment operator,

COPYRIGHTED MATERIAL INDEX. Symbols

COPYRIGHTED MATERIAL INDEX. Symbols INDEX Symbols 16-bit characters, 10 32-bit characters, 10! operator, 11 %= operator, 12 & operator, 12 &= operator, 12 *= operator, 12 += operator, 12

More information

CHAPTER 1: A CRASH COURSE IN C++ 3 CHAPTER 2: DESIGNING PROFESSIONAL C++ PROGRAMS 49

CHAPTER 1: A CRASH COURSE IN C++ 3 CHAPTER 2: DESIGNING PROFESSIONAL C++ PROGRAMS 49 INTRODUCTION xxv PART I: INTRODUCTION TO PROFESSIONAL C++ CHAPTER 1: A CRASH COURSE IN C++ 3 The Basics of C++ 3 The Obligatory Hello, World 4 Namespaces 7 Variables 8 Operators 11 Types 13 Conditionals

More information

Absolute C++ Walter Savitch

Absolute C++ Walter Savitch Absolute C++ sixth edition Walter Savitch Global edition This page intentionally left blank Absolute C++, Global Edition Cover Title Page Copyright Page Preface Acknowledgments Brief Contents Contents

More information

CHAPTER 1 Introduction to Computers and Programming CHAPTER 2 Introduction to C++ ( Hexadecimal 0xF4 and Octal literals 031) cout Object

CHAPTER 1 Introduction to Computers and Programming CHAPTER 2 Introduction to C++ ( Hexadecimal 0xF4 and Octal literals 031) cout Object CHAPTER 1 Introduction to Computers and Programming 1 1.1 Why Program? 1 1.2 Computer Systems: Hardware and Software 2 1.3 Programs and Programming Languages 8 1.4 What is a Program Made of? 14 1.5 Input,

More information

Preface to the Second Edition Preface to the First Edition Brief Contents Introduction to C++ p. 1 A Review of Structures p.

Preface to the Second Edition Preface to the First Edition Brief Contents Introduction to C++ p. 1 A Review of Structures p. Preface to the Second Edition p. iii Preface to the First Edition p. vi Brief Contents p. ix Introduction to C++ p. 1 A Review of Structures p. 1 The Need for Structures p. 1 Creating a New Data Type Using

More information

C++11/14 Rocks. VS2013 Edition. Alex Korban

C++11/14 Rocks. VS2013 Edition. Alex Korban C++11/14 Rocks VS2013 Edition Alex Korban 1 Contents Introduction 18 Type Inference 20 auto... 20 decltype... 24 Side e ects... 25 Trailing return types... 26 Non-standard behavior and bugs in Visual Studio

More information

C++11 and Compiler Update

C++11 and Compiler Update C++11 and Compiler Update John JT Thomas Sr. Director Application Developer Products About this Session A Brief History Features of C++11 you should be using now Questions 2 Bjarne Stroustrup C with Objects

More information

Short Notes of CS201

Short Notes of CS201 #includes: Short Notes of CS201 The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with < and > if the file is a system

More information

CS201 - Introduction to Programming Glossary By

CS201 - Introduction to Programming Glossary By CS201 - Introduction to Programming Glossary By #include : The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with

More information

Problem Solving with C++

Problem Solving with C++ GLOBAL EDITION Problem Solving with C++ NINTH EDITION Walter Savitch Kendrick Mock Ninth Edition PROBLEM SOLVING with C++ Problem Solving with C++, Global Edition Cover Title Copyright Contents Chapter

More information

Contents. 2 Introduction to C++ Programming,

Contents. 2 Introduction to C++ Programming, cppfp2_toc.fm Page vii Thursday, February 14, 2013 9:33 AM Chapter 24 and Appendices F K are PDF documents posted online at www.informit.com/title/9780133439854 Preface xix 1 Introduction 1 1.1 Introduction

More information

C++ Primer, Fifth Edition

C++ Primer, Fifth Edition C++ Primer, Fifth Edition Stanley B. Lippman Josée Lajoie Barbara E. Moo Upper Saddle River, NJ Boston Indianapolis San Francisco New York Toronto Montreal London Munich Paris Madrid Capetown Sidney Tokyo

More information

Advanced C++ Programming Workshop (With C++11, C++14, C++17) & Design Patterns

Advanced C++ Programming Workshop (With C++11, C++14, C++17) & Design Patterns Advanced C++ Programming Workshop (With C++11, C++14, C++17) & Design Patterns This Advanced C++ Programming training course is a comprehensive course consists of three modules. A preliminary module reviews

More information

The Foundation of C++: The C Subset An Overview of C p. 3 The Origins and History of C p. 4 C Is a Middle-Level Language p. 5 C Is a Structured

The Foundation of C++: The C Subset An Overview of C p. 3 The Origins and History of C p. 4 C Is a Middle-Level Language p. 5 C Is a Structured Introduction p. xxix The Foundation of C++: The C Subset An Overview of C p. 3 The Origins and History of C p. 4 C Is a Middle-Level Language p. 5 C Is a Structured Language p. 6 C Is a Programmer's Language

More information

Index. Symbols. bit sequence, 27 ^ (exclusive OR) operator, 30 hexadecimal number, 27 left shift (<<) operator, 31 right shift (>>) operator, 32

Index. Symbols. bit sequence, 27 ^ (exclusive OR) operator, 30 hexadecimal number, 27 left shift (<<) operator, 31 right shift (>>) operator, 32 Symbols && operator, 32 operator, 32 A AddDynamicOption method, 188 AddItem method, 192 Addition operator, 18 Allocating memory, 228 overloaded delete function, 233 overloaded new function, 232 unnamed

More information

Deitel Series Page How To Program Series

Deitel Series Page How To Program Series Deitel Series Page How To Program Series Android How to Program C How to Program, 7/E C++ How to Program, 9/E C++ How to Program, Late Objects Version, 7/E Java How to Program, 9/E Java How to Program,

More information

C Programming. Course Outline. C Programming. Code: MBD101. Duration: 10 Hours. Prerequisites:

C Programming. Course Outline. C Programming. Code: MBD101. Duration: 10 Hours. Prerequisites: C Programming Code: MBD101 Duration: 10 Hours Prerequisites: You are a computer science Professional/ graduate student You can execute Linux/UNIX commands You know how to use a text-editing tool You should

More information

Appendix. Grammar. A.1 Introduction. A.2 Keywords. There is no worse danger for a teacher than to teach words instead of things.

Appendix. Grammar. A.1 Introduction. A.2 Keywords. There is no worse danger for a teacher than to teach words instead of things. A Appendix Grammar There is no worse danger for a teacher than to teach words instead of things. Marc Block Introduction keywords lexical conventions programs expressions statements declarations declarators

More information

PIC10B/1 Winter 2014 Exam I Study Guide

PIC10B/1 Winter 2014 Exam I Study Guide PIC10B/1 Winter 2014 Exam I Study Guide Suggested Study Order: 1. Lecture Notes (Lectures 1-8 inclusive) 2. Examples/Homework 3. Textbook The midterm will test 1. Your ability to read a program and understand

More information

Introduction to Computers and C++ Programming p. 1 Computer Systems p. 2 Hardware p. 2 Software p. 7 High-Level Languages p. 8 Compilers p.

Introduction to Computers and C++ Programming p. 1 Computer Systems p. 2 Hardware p. 2 Software p. 7 High-Level Languages p. 8 Compilers p. Introduction to Computers and C++ Programming p. 1 Computer Systems p. 2 Hardware p. 2 Software p. 7 High-Level Languages p. 8 Compilers p. 9 Self-Test Exercises p. 11 History Note p. 12 Programming and

More information

Preface... (vii) CHAPTER 1 INTRODUCTION TO COMPUTERS

Preface... (vii) CHAPTER 1 INTRODUCTION TO COMPUTERS Contents Preface... (vii) CHAPTER 1 INTRODUCTION TO COMPUTERS 1.1. INTRODUCTION TO COMPUTERS... 1 1.2. HISTORY OF C & C++... 3 1.3. DESIGN, DEVELOPMENT AND EXECUTION OF A PROGRAM... 3 1.4 TESTING OF PROGRAMS...

More information

C++ How To Program 10 th Edition. Table of Contents

C++ How To Program 10 th Edition. Table of Contents C++ How To Program 10 th Edition Table of Contents Preface xxiii Before You Begin xxxix 1 Introduction to Computers and C++ 1 1.1 Introduction 1.2 Computers and the Internet in Industry and Research 1.3

More information

Introduction to C++ Systems Programming

Introduction to C++ Systems Programming Introduction to C++ Systems Programming Introduction to C++ Syntax differences between C and C++ A Simple C++ Example C++ Input/Output C++ Libraries C++ Header Files Another Simple C++ Example Inline Functions

More information

Borland 105, 278, 361, 1135 Bounded array Branch instruction 7 break statement 170 BTree 873 Building a project 117 Built in data types 126

Borland 105, 278, 361, 1135 Bounded array Branch instruction 7 break statement 170 BTree 873 Building a project 117 Built in data types 126 INDEX = (assignment operator) 130, 816 = 0 (as function definition) 827 == (equality test operator) 146! (logical NOT operator) 159!= (inequality test operator) 146 #define 140, 158 #include 100, 112,

More information

Weiss Chapter 1 terminology (parenthesized numbers are page numbers)

Weiss Chapter 1 terminology (parenthesized numbers are page numbers) Weiss Chapter 1 terminology (parenthesized numbers are page numbers) assignment operators In Java, used to alter the value of a variable. These operators include =, +=, -=, *=, and /=. (9) autoincrement

More information

CS201 Latest Solved MCQs

CS201 Latest Solved MCQs Quiz Start Time: 09:34 PM Time Left 82 sec(s) Question # 1 of 10 ( Start time: 09:34:54 PM ) Total Marks: 1 While developing a program; should we think about the user interface? //handouts main reusability

More information

Chapter 15 - C++ As A "Better C"

Chapter 15 - C++ As A Better C Chapter 15 - C++ As A "Better C" Outline 15.1 Introduction 15.2 C++ 15.3 A Simple Program: Adding Two Integers 15.4 C++ Standard Library 15.5 Header Files 15.6 Inline Functions 15.7 References and Reference

More information

Introduction to C++ Professor Hugh C. Lauer CS-2303, System Programming Concepts

Introduction to C++ Professor Hugh C. Lauer CS-2303, System Programming Concepts Introduction to C++ Professor Hugh C. Lauer CS-2303, System Programming Concepts (Slides include materials from The C Programming Language, 2 nd edition, by Kernighan and Ritchie, Absolute C++, by Walter

More information

Writing an ANSI C Program Getting Ready to Program A First Program Variables, Expressions, and Assignments Initialization The Use of #define and

Writing an ANSI C Program Getting Ready to Program A First Program Variables, Expressions, and Assignments Initialization The Use of #define and Writing an ANSI C Program Getting Ready to Program A First Program Variables, Expressions, and Assignments Initialization The Use of #define and #include The Use of printf() and scanf() The Use of printf()

More information

Welcome to Teach Yourself Acknowledgments Fundamental C++ Programming p. 2 An Introduction to C++ p. 4 A Brief History of C++ p.

Welcome to Teach Yourself Acknowledgments Fundamental C++ Programming p. 2 An Introduction to C++ p. 4 A Brief History of C++ p. Welcome to Teach Yourself p. viii Acknowledgments p. xv Fundamental C++ Programming p. 2 An Introduction to C++ p. 4 A Brief History of C++ p. 6 Standard C++: A Programming Language and a Library p. 8

More information

Quiz Start Time: 09:34 PM Time Left 82 sec(s)

Quiz Start Time: 09:34 PM Time Left 82 sec(s) Quiz Start Time: 09:34 PM Time Left 82 sec(s) Question # 1 of 10 ( Start time: 09:34:54 PM ) Total Marks: 1 While developing a program; should we think about the user interface? //handouts main reusability

More information

Distance Learning Advanced C++ - Programming Models, boost and Parallel Computing

Distance Learning Advanced C++ - Programming Models, boost and Parallel Computing Distance Learning Advanced C++ - Programming Models, boost and Parallel Computing Module 1: Quick Review of C++ Essentials General Considerations The canonical class definition Why const is important Raw

More information

Chapters and Appendices F J are PDF documents posted online at the book s Companion Website, which is accessible from.

Chapters and Appendices F J are PDF documents posted online at the book s Companion Website, which is accessible from. Contents Chapters 23 26 and Appendices F J are PDF documents posted online at the book s Companion Website, which is accessible from http://www.pearsonhighered.com/deitel See the inside front cover for

More information

Model Viva Questions for Programming in C lab

Model Viva Questions for Programming in C lab Model Viva Questions for Programming in C lab Title of the Practical: Assignment to prepare general algorithms and flow chart. Q1: What is a flowchart? A1: A flowchart is a diagram that shows a continuous

More information

THINK LIKE CREATIVE PROBLEM SOLVING V. ANTON SPRAUL

THINK LIKE CREATIVE PROBLEM SOLVING V. ANTON SPRAUL THINK LIKE A PROGRAMMERA A N I N T R O D U C T I O N T O CREATIVE PROBLEM SOLVING V. ANTON SPRAUL CODE EAT SLEEP INDEX Numbers and Symbols && operator (logical and), 48 short-circuit evaluation of, 129,

More information

CSCI 171 Chapter Outlines

CSCI 171 Chapter Outlines Contents CSCI 171 Chapter 1 Overview... 2 CSCI 171 Chapter 2 Programming Components... 3 CSCI 171 Chapter 3 (Sections 1 4) Selection Structures... 5 CSCI 171 Chapter 3 (Sections 5 & 6) Iteration Structures

More information

Supplement I.A: Glossary. For Introduction to C++ Programming, Second Edition By Y. Daniel Liang

Supplement I.A: Glossary. For Introduction to C++ Programming, Second Edition By Y. Daniel Liang Chapter 1 Supplement I.A: Glossary For Introduction to C++ Programming, Second Edition By Y. Daniel Liang assembly language A low-level programming language in which a mnemonic is used to represent each

More information

CS201 Some Important Definitions

CS201 Some Important Definitions CS201 Some Important Definitions For Viva Preparation 1. What is a program? A program is a precise sequence of steps to solve a particular problem. 2. What is a class? We write a C++ program using data

More information

C++11/14 Rocks. Clang Edition. Alex Korban

C++11/14 Rocks. Clang Edition. Alex Korban C++11/14 Rocks Clang Edition Alex Korban 1 Contents Introduction 9 C++11 guiding principles... 9 Type Inference 11 auto... 11 Some things are still manual... 12 More than syntactic sugar... 12 Why else

More information

Practical C++ Programming

Practical C++ Programming SECOND EDITION Practical C++ Programming Steve Oualline O'REILLY' Beijing Cambridge Farnham Koln Paris Sebastopol Taipei Tokyo Preface xv Part I. The Basics 1. What Is C++? 3 A Brief History of C++ 3 C++

More information

Axivion Bauhaus Suite Technical Factsheet AUTOSAR

Axivion Bauhaus Suite Technical Factsheet AUTOSAR Version 6.9.1 upwards Axivion Bauhaus Suite Technical Factsheet AUTOSAR Version 6.9.1 upwards Contents 1. C++... 2 1. Autosar C++14 Guidelines (AUTOSAR 17.03)... 2 2. Autosar C++14 Guidelines (AUTOSAR

More information

Cpt S 122 Data Structures. Course Review Midterm Exam # 2

Cpt S 122 Data Structures. Course Review Midterm Exam # 2 Cpt S 122 Data Structures Course Review Midterm Exam # 2 Nirmalya Roy School of Electrical Engineering and Computer Science Washington State University Midterm Exam 2 When: Monday (11/05) 12:10 pm -1pm

More information

Basic Types, Variables, Literals, Constants

Basic Types, Variables, Literals, Constants Basic Types, Variables, Literals, Constants What is in a Word? A byte is the basic addressable unit of memory in RAM Typically it is 8 bits (octet) But some machines had 7, or 9, or... A word is the basic

More information

IBM i Version 7.2. Programming IBM Rational Development Studio for i ILE C/C++ Language Reference IBM SC

IBM i Version 7.2. Programming IBM Rational Development Studio for i ILE C/C++ Language Reference IBM SC IBM i Version 7.2 Programming IBM Rational Development Studio for i ILE C/C++ Language Reference IBM SC09-7852-03 IBM i Version 7.2 Programming IBM Rational Development Studio for i ILE C/C++ Language

More information

Supplement I.A: Glossary. For Introduction to C++ Programming, Third Edition By Y. Daniel Liang

Supplement I.A: Glossary. For Introduction to C++ Programming, Third Edition By Y. Daniel Liang Chapter 1 Supplement I.A: Glossary For Introduction to C++ Programming, Third Edition By Y. Daniel Liang assembler A program that translates assembly-language programs into machine code. assembly language

More information

CS3157: Advanced Programming. Outline

CS3157: Advanced Programming. Outline CS3157: Advanced Programming Lecture #12 Apr 3 Shlomo Hershkop shlomo@cs.columbia.edu 1 Outline Intro CPP Boring stuff: Language basics: identifiers, data types, operators, type conversions, branching

More information

Interview Questions of C++

Interview Questions of C++ Interview Questions of C++ Q-1 What is the full form of OOPS? Ans: Object Oriented Programming System. Q-2 What is a class? Ans: Class is a blue print which reflects the entities attributes and actions.

More information

September 10,

September 10, September 10, 2013 1 Bjarne Stroustrup, AT&T Bell Labs, early 80s cfront original C++ to C translator Difficult to debug Potentially inefficient Many native compilers exist today C++ is mostly upward compatible

More information

COEN244: Class & function templates

COEN244: Class & function templates COEN244: Class & function templates Aishy Amer Electrical & Computer Engineering Templates Function Templates Class Templates Outline Templates and inheritance Introduction to C++ Standard Template Library

More information

Contents. Figures. Tables. Examples. Foreword. Preface. 1 Basics of Java Programming 1. xix. xxi. xxiii. xxvii. xxix

Contents. Figures. Tables. Examples. Foreword. Preface. 1 Basics of Java Programming 1. xix. xxi. xxiii. xxvii. xxix PGJC4_JSE8_OCA.book Page ix Monday, June 20, 2016 2:31 PM Contents Figures Tables Examples Foreword Preface xix xxi xxiii xxvii xxix 1 Basics of Java Programming 1 1.1 Introduction 2 1.2 Classes 2 Declaring

More information

Computer Science 306 Study Guide

Computer Science 306 Study Guide Computer Science 306 Study Guide C++ for Programmers Computer Science 306 Study Guide (Print Version) Copyright and Credits - Unit 0 - Introduction to C++ for Programmers Section 1 - The programming environment

More information

I BSc(IT) [ Batch] Semester II Core: Object Oriented Programming With C plus plus - 212A Multiple Choice Questions.

I BSc(IT) [ Batch] Semester II Core: Object Oriented Programming With C plus plus - 212A Multiple Choice Questions. Dr.G.R.Damodaran College of Science (Autonomous, affiliated to the Bharathiar University, recognized by the UGC)Reaccredited at the 'A' Grade Level by the NAAC and ISO 9001:2008 Certified CRISL rated 'A'

More information

STRUCTURING OF PROGRAM

STRUCTURING OF PROGRAM Unit III MULTIPLE CHOICE QUESTIONS 1. Which of the following is the functionality of Data Abstraction? (a) Reduce Complexity (c) Parallelism Unit III 3.1 (b) Binds together code and data (d) None of the

More information

Introduction to C++11 and its use inside Qt

Introduction to C++11 and its use inside Qt Introduction to C++11 and its use inside Qt Olivier Goffart February 2013 1/43 Introduction to C++11 and its use inside Qt About Me http://woboq.com http://code.woboq.org 2/43 Introduction to C++11 and

More information

Contents. 1 Introduction to Computers, the Internet and the World Wide Web 1. 2 Introduction to C Programming 26

Contents. 1 Introduction to Computers, the Internet and the World Wide Web 1. 2 Introduction to C Programming 26 Preface xix 1 Introduction to Computers, the Internet and the World Wide Web 1 1.1 Introduction 2 1.2 What Is a Computer? 4 1.3 Computer Organization 4 1.4 Evolution of Operating Systems 5 1.5 Personal,

More information

WA1278 Introduction to Java Using Eclipse

WA1278 Introduction to Java Using Eclipse Lincoln Land Community College Capital City Training Center 130 West Mason Springfield, IL 62702 217-782-7436 www.llcc.edu/cctc WA1278 Introduction to Java Using Eclipse This course introduces the Java

More information

Chapter 2. Procedural Programming

Chapter 2. Procedural Programming Chapter 2 Procedural Programming 2: Preview Basic concepts that are similar in both Java and C++, including: standard data types control structures I/O functions Dynamic memory management, and some basic

More information

VALLIAMMAI ENGINEERING COLLEGE

VALLIAMMAI ENGINEERING COLLEGE VALLIAMMAI ENGINEERING COLLEGE SRM Nagar, Kattankulathur 603 203 DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING QUESTION BANK B.E. - Electrical and Electronics Engineering IV SEMESTER CS6456 - OBJECT ORIENTED

More information

C++11 Introduction to the New Standard. Alejandro Cabrera February 1, 2012 Florida State University Department of Computer Science

C++11 Introduction to the New Standard. Alejandro Cabrera February 1, 2012 Florida State University Department of Computer Science C++11 Introduction to the New Standard Alejandro Cabrera February 1, 2012 Florida State University Department of Computer Science Overview A Brief History of C++ Features Improving: Overall Use Meta-programming

More information

Programming. Principles and Practice Using C++ Bjarne Stroustrup. / Addison-Wesley. Second Edition

Programming. Principles and Practice Using C++ Bjarne Stroustrup. / Addison-Wesley. Second Edition Programming Principles and Practice Using C++ Second Edition Bjarne Stroustrup / Addison-Wesley Upper Saddle River, NJ Boston Indianapolis San Francisco New York Toronto Montreal London Munich Paris Madrid

More information

OBJECT ORIENTED PROGRAMMING USING C++ CSCI Object Oriented Analysis and Design By Manali Torpe

OBJECT ORIENTED PROGRAMMING USING C++ CSCI Object Oriented Analysis and Design By Manali Torpe OBJECT ORIENTED PROGRAMMING USING C++ CSCI 5448- Object Oriented Analysis and Design By Manali Torpe Fundamentals of OOP Class Object Encapsulation Abstraction Inheritance Polymorphism Reusability C++

More information

Introduction to Programming Using Java (98-388)

Introduction to Programming Using Java (98-388) Introduction to Programming Using Java (98-388) Understand Java fundamentals Describe the use of main in a Java application Signature of main, why it is static; how to consume an instance of your own class;

More information

Object-Oriented Programming

Object-Oriented Programming - oriented - iuliana@cs.ubbcluj.ro Babes-Bolyai University 2018 1 / 56 Overview - oriented 1 2 -oriented 3 4 5 6 7 8 Static and friend elements 9 Summary 2 / 56 I - oriented was initially created by Bjarne

More information

Contents. Preface. Introduction. Introduction to C Programming

Contents. Preface. Introduction. Introduction to C Programming c11fptoc.fm Page vii Saturday, March 23, 2013 4:15 PM Preface xv 1 Introduction 1 1.1 1.2 1.3 1.4 1.5 Introduction The C Programming Language C Standard Library C++ and Other C-Based Languages Typical

More information

RAD Studio XE3 The Developer Force Multiplier

RAD Studio XE3 The Developer Force Multiplier RAD Studio XE3 The Developer Force Multiplier Windows 8 Mac OS X Mountain Lion C++11 64-bit Metropolis UI C99 Boost Visual LiveBindings C++ Bjarne Stroustrup C with Objects (1979) Modeled OO after Simula

More information

IBM i Version 7.3. Programming IBM Rational Development Studio for i ILE C/C++ Language Reference IBM SC

IBM i Version 7.3. Programming IBM Rational Development Studio for i ILE C/C++ Language Reference IBM SC IBM i Version 7.3 Programming IBM Rational Development Studio for i ILE C/C++ Language Reference IBM SC09-7852-04 IBM i Version 7.3 Programming IBM Rational Development Studio for i ILE C/C++ Language

More information

Tokens, Expressions and Control Structures

Tokens, Expressions and Control Structures 3 Tokens, Expressions and Control Structures Tokens Keywords Identifiers Data types User-defined types Derived types Symbolic constants Declaration of variables Initialization Reference variables Type

More information

SRM ARTS AND SCIENCE COLLEGE SRM NAGAR, KATTANKULATHUR

SRM ARTS AND SCIENCE COLLEGE SRM NAGAR, KATTANKULATHUR SRM ARTS AND SCIENCE COLLEGE SRM NAGAR, KATTANKULATHUR 603203 DEPARTMENT OF COMPUTER SCIENCE & APPLICATIONS QUESTION BANK (2017-2018) Course / Branch : M.Sc CST Semester / Year : EVEN / II Subject Name

More information

Index COPYRIGHTED MATERIAL

Index COPYRIGHTED MATERIAL Index COPYRIGHTED MATERIAL Note to the Reader: Throughout this index boldfaced page numbers indicate primary discussions of a topic. Italicized page numbers indicate illustrations. A abstract classes

More information

CERTIFICATE IN WEB PROGRAMMING

CERTIFICATE IN WEB PROGRAMMING COURSE DURATION: 6 MONTHS CONTENTS : CERTIFICATE IN WEB PROGRAMMING 1. PROGRAMMING IN C and C++ Language 2. HTML/CSS and JavaScript 3. PHP and MySQL 4. Project on Development of Web Application 1. PROGRAMMING

More information

Major Language Changes, pt. 1

Major Language Changes, pt. 1 C++0x What is C++0x? Updated version of C++ language. Addresses unresolved problems in C++03. Almost completely backwards compatible. Greatly increases expressiveness (and complexity!) of language. Greatly

More information

Overload Resolution. Ansel Sermersheim & Barbara Geller Amsterdam C++ Group March 2019

Overload Resolution. Ansel Sermersheim & Barbara Geller Amsterdam C++ Group March 2019 Ansel Sermersheim & Barbara Geller Amsterdam C++ Group March 2019 1 Introduction Prologue Definition of Function Overloading Determining which Overload to call How Works Standard Conversion Sequences Examples

More information

C-LANGUAGE CURRICULAM

C-LANGUAGE CURRICULAM C-LANGUAGE CURRICULAM Duration: 2 Months. 1. Introducing C 1.1 History of C Origin Standardization C-Based Languages 1.2 Strengths and Weaknesses Of C Strengths Weaknesses Effective Use of C 2. C Fundamentals

More information

C and C++ Courses. C Language

C and C++ Courses. C Language C Language The "C" Language is currently one of the most widely used programming languages. Designed as a tool for creating operating systems (with its help the first Unix systems were constructed) it

More information

cs3157: c++ lecture #2 (mon-11-apr-2005) chronology of some programming languages... C++ vs Java identifiers.

cs3157: c++ lecture #2 (mon-11-apr-2005) chronology of some programming languages... C++ vs Java identifiers. cs3157: c++ lecture #2 (mon-11-apr-2005) chronology of some programming languages... today: language basics: identifiers, data types, operators, type conversions, branching and looping, program structure

More information

UNIT- 3 Introduction to C++

UNIT- 3 Introduction to C++ UNIT- 3 Introduction to C++ C++ Character Sets: Letters A-Z, a-z Digits 0-9 Special Symbols Space + - * / ^ \ ( ) [ ] =!= . $, ; : %! &? _ # = @ White Spaces Blank spaces, horizontal tab, carriage

More information

C++ Coding Standards. 101 Rules, Guidelines, and Best Practices. Herb Sutter Andrei Alexandrescu. Boston. 'Y.'YAddison-Wesley

C++ Coding Standards. 101 Rules, Guidelines, and Best Practices. Herb Sutter Andrei Alexandrescu. Boston. 'Y.'YAddison-Wesley C++ Coding Standards 101 Rules, Guidelines, and Best Practices Herb Sutter Andrei Alexandrescu 'Y.'YAddison-Wesley Boston Contents Prefaee xi Organizational and Poliey Issues 1 o. Don't sweat the small

More information

About Codefrux While the current trends around the world are based on the internet, mobile and its applications, we try to make the most out of it. As for us, we are a well established IT professionals

More information

CONTENTS. PART 1 Structured Programming 1. 1 Getting started 3. 2 Basic programming elements 17

CONTENTS. PART 1 Structured Programming 1. 1 Getting started 3. 2 Basic programming elements 17 List of Programs xxv List of Figures xxix List of Tables xxxiii Preface to second version xxxv PART 1 Structured Programming 1 1 Getting started 3 1.1 Programming 3 1.2 Editing source code 5 Source code

More information

https://asd-pa.perfplusk12.com/admin/admin_curric_maps_display.aspx?m=5507&c=618&mo=18917&t=191&sy=2012&bl...

https://asd-pa.perfplusk12.com/admin/admin_curric_maps_display.aspx?m=5507&c=618&mo=18917&t=191&sy=2012&bl... Page 1 of 13 Units: - All - Teacher: ProgIIIJavaI, CORE Course: ProgIIIJavaI Year: 2012-13 Intro to Java How is data stored by a computer system? What does a compiler do? What are the advantages of using

More information

c++ keywords: ( all lowercase ) Note: cin and cout are NOT keywords.

c++ keywords: ( all lowercase ) Note: cin and cout are NOT keywords. Chapter 1 File Extensions: Source code (cpp), Object code (obj), and Executable code (exe). Preprocessor processes directives and produces modified source Compiler takes modified source and produces object

More information

Learning Objectives. C++ For Artists 2003 Rick Miller All Rights Reserved xli

Learning Objectives. C++ For Artists 2003 Rick Miller All Rights Reserved xli Identify and overcome the difficulties encountered by students when learning how to program List and explain the software development roles played by students List and explain the phases of the tight spiral

More information

Get Unique study materials from

Get Unique study materials from Downloaded from www.rejinpaul.com VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur 603203. DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING Year & Semester : IV Section : EEE - 1 & 2 Subject Code

More information

dewhurst_index.qxd 10/16/02 1:54 PM Page 309 Index

dewhurst_index.qxd 10/16/02 1:54 PM Page 309 Index dewhurst_index.qxd 10/16/02 1:54 PM Page 309 Index, (comma operator), 39 40?: (conditional operator), 15 16, 40 41 [ ] (allocating and deleting arrays), 35, 36, 168 ( ) (allocating arrays), 35 -> (arrow

More information

Index. apallocator_ 31, 36 allocation 38 constructor 36 deallocation 39 definition 36

Index. apallocator_ 31, 36 allocation 38 constructor 36 deallocation 39 definition 36 comcppix.fm Page 321 Tuesday, March 25, 2003 2:53 PM Index A Affine transform 302 AIX 153 Algorithms bilinear interpolation 300 Gaussian kernel 227 high-pass kernel 226 Laplacian kernel 221 low-pass kernel

More information

Object-Oriented Programming

Object-Oriented Programming Object-Oriented Programming 1. What is object-oriented programming (OOP)? OOP is a technique to develop logical modules, such as classes that contain properties, methods, fields, and events. An object

More information

Jayaram college of Engineering and Technology, Pagalavadi. CS2203 Object Oriented Programming Question Bank Prepared By: S.Gopalakrishnan, Lecturer/IT

Jayaram college of Engineering and Technology, Pagalavadi. CS2203 Object Oriented Programming Question Bank Prepared By: S.Gopalakrishnan, Lecturer/IT CS2203 Object Oriented Programming Question Bank Prepared By: S.Gopalakrishnan, Lecturer/IT Two Mark Questions UNIT - I 1. DEFINE ENCAPSULATION. Encapsulation is the process of combining data and functions

More information

index C++ language characters ASCII codes, 16 escape sequence, 19 trigraph sequence, 18 UCS codes, 17 Unicode, 17 classes, 7 code presentation styles,

index C++ language characters ASCII codes, 16 escape sequence, 19 trigraph sequence, 18 UCS codes, 17 Unicode, 17 classes, 7 code presentation styles, Index A Abstract class Circle class creation, 454 constructor, 453 data member, 457 definition, 453 interface, 455 three-level class hierarchy, 458 Vessel class, 456 457 volume() function, 454 455 Access

More information

Axivion Bauhaus Suite Technical Factsheet MISRA

Axivion Bauhaus Suite Technical Factsheet MISRA MISRA Contents 1. C... 2 1. Misra C 2004... 2 2. Misra C 2012 (including Amendment 1). 10 3. Misra C 2012 Directives... 18 2. C++... 19 4. Misra C++ 2008... 19 1 / 31 1. C 1. Misra C 2004 MISRA Rule Severity

More information

Casting -Allows a narrowing assignment by asking the Java compiler to "trust us"

Casting -Allows a narrowing assignment by asking the Java compiler to trust us Primitives Integral types: int, short, long, char, byte Floating point types: double, float Boolean types: boolean -passed by value (copied when returned or passed as actual parameters) Arithmetic Operators:

More information

Object Oriented Programming with c++ Question Bank

Object Oriented Programming with c++ Question Bank Object Oriented Programming with c++ Question Bank UNIT-1: Introduction to C++ 1. Describe the following characteristics of OOP. i Encapsulation ii Polymorphism, iii Inheritance 2. Discuss function prototyping,

More information

SAURASHTRA UNIVERSITY

SAURASHTRA UNIVERSITY SAURASHTRA UNIVERSITY RAJKOT INDIA Accredited Grade A by NAAC (CGPA 3.05) CURRICULAM FOR B.Sc. (Computer Science) Bachelor of Science (Computer Science) (Semester - 1 Semester - 2) Effective From June

More information

Introduction to Programming

Introduction to Programming Introduction to Programming session 6 Instructor: Reza Entezari-Maleki Email: entezari@ce.sharif.edu 1 Spring 2011 These slides are created using Deitel s slides Sharif University of Technology Outlines

More information

Remedial C Now that we can actually use it Pete Williamson

Remedial C Now that we can actually use it Pete Williamson Remedial C++ 11 Now that we can actually use it Pete Williamson (petewil00@hotmail.com) Overview (1) auto lambdas nullptr = default, = delete shared_ptr Range based for loops Overview (2) Uniform initialization

More information

Lecture 21 Standard Template Library. A simple, but very limited, view of STL is the generality that using template functions provides.

Lecture 21 Standard Template Library. A simple, but very limited, view of STL is the generality that using template functions provides. Lecture 21 Standard Template Library STL: At a C++ standards meeting in 1994, the committee voted to adopt a proposal by Alex Stepanov of Hewlett-Packard Laboratories to include, as part of the standard

More information

COMP322 - Introduction to C++ Lecture 02 - Basics of C++

COMP322 - Introduction to C++ Lecture 02 - Basics of C++ COMP322 - Introduction to C++ Lecture 02 - Basics of C++ School of Computer Science 16 January 2012 C++ basics - Arithmetic operators Where possible, C++ will automatically convert among the basic types.

More information

Review of the C Programming Language for Principles of Operating Systems

Review of the C Programming Language for Principles of Operating Systems Review of the C Programming Language for Principles of Operating Systems Prof. James L. Frankel Harvard University Version of 7:26 PM 4-Sep-2018 Copyright 2018, 2016, 2015 James L. Frankel. All rights

More information

CS 240 Final Exam Review

CS 240 Final Exam Review CS 240 Final Exam Review Linux I/O redirection Pipelines Standard commands C++ Pointers How to declare How to use Pointer arithmetic new, delete Memory leaks C++ Parameter Passing modes value pointer reference

More information

2 ADT Programming User-defined abstract data types

2 ADT Programming User-defined abstract data types Preview 2 ADT Programming User-defined abstract data types user-defined data types in C++: classes constructors and destructors const accessor functions, and inline functions special initialization construct

More information

Index. object lifetimes, and ownership, use after change by an alias errors, use after drop errors, BTreeMap, 309

Index. object lifetimes, and ownership, use after change by an alias errors, use after drop errors, BTreeMap, 309 A Arithmetic operation floating-point arithmetic, 11 12 integer numbers, 9 11 Arrays, 97 copying, 59 60 creation, 48 elements, 48 empty arrays and vectors, 57 58 executable program, 49 expressions, 48

More information