⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tycpp.toc

📁 《标准C++宝典》源码
💻 TOC
字号:
;
;  If you modify this file, Quincy's on-line tutorial support will probably fail
;
C++ Example Programs
  1: Introduction to Programming in C++
    1: The minimum C++ program
  2: Writing Simple C++ Programs
    1: Your first C++ program
    2: bool
    3: char
    4: wchar_t
    5: int
    6: float
    7: Concatenated string constants
    8: Assignments and expressions
    9: Assigning an expression
    10: Increment and decrement operators
    11: Assigning assignments
    12: Compound assignments
    13: The conditional operator
    14: Comma-separated expressions
    15: Initializers
    16: Type conversions
    17: Improved std::cout usage
    18: Formatting numerical data
    19: The standard input stream
    20: Reading a string
  3: Functions
    1: Defining a function
    2: Returning with return statement
    3: Returning a value
    4: Function arguments
    5: Functions with multiple parameters
    6: Default arguments
    7: inline function
    8: Overloading functions, example 1:
    9: Overloading functions, example 2:
    10: Linkage specifications
  4: Program Flow Control
    1: Testing with if for zero
    2: Testing with if for nonzero
    3: Conditionally executing a program block
    4: else
    5: else if
    6: The switch...case statement
    7: while
    8: do...while
    9: for
    10: Iterating through an array
    11: break
    12: continue
    13: goto
    14: The fixed goto program
    15: The fixed goto program - again
  5: More About C++ Data
    1: Global scope
    2: Local scope
    3: Variables hidden by scope
    4: Global scope resolution operator
    5: File scope
    6: Scope vs. lifetime
    7: static storage class
    8: extern storage class
    9: register storage class
    10: const type qualifier
    11: volatile type qualifier
    12: struct data type
    13: Initializing a structure variable
    14: Structures within structures
    15: Passing and returning structures
    16: union data type
    17: Initializing a struct-containing union
    18: Anonymous unions
    19: enum data type
    20: Array of integers
    21: Array of structures
    22: Two-dimensional array
    23: Initializing a character array
  6: Pointers, Addresses and Reference Variables
    1: Pointers to intrinsic types
    2: Pointer arithmetic with ++
    3: Pointer arithmetic with expressions
    4: Array address notation
    5: Pointers and arrays
    6: Pointers to structures
    7: Pointer arguments
    8: Pointer arguments to multiple-dimension arrays
    9: Returning an address
    10: Iterating with a returned pointer
    11: Function pointers
    12: A menu manager
    13: Pointers to pointers
    14: Pointers to arrays of pointers
    15: const pointer arguments
    16: const pointers
    17: void pointer
    18: Using sizeof to compute array elements
    19: typedef storage class
    20: Command-line arguments
    21: new and delete operators
    22: new and delete operators with an array
    23: new operator and dynamic arrays
    24: Recursion
    25: Recursive calculator
    26: Reference variable
    27: Addresses of references
    28: References to reduce complex notation
    29: References as function parameters
    30: Call by reference
    31: Returning references
  7: Library Functions
    1: assert macro
    2: errno
    3: setjmp() and longjmp()
    4: Variable argument lists
    5: Seeding the random number generator
    6: strcmp(), strcpy(), and strlen()
    7: <ctime> functions
  8: The Preprocessor
    1: #define macros
    2: No macros
    3: # stringizing operator
    4: ## token pasting operator
    5: More ## pasting
    6: #if and #endif directives
    7: #if defined directive
    8: #else directive
    9: #elif directive
    10: #error directive
  9: Structures and Classes
    1: Data abstraction and procedural programming
    2: Structures with functions
    3: Multiple instances of a structure
    4: Two structures with the same function name
  10: Function Templates
    1: A simple function template
    2: min3() function template
    3: Comparing strings with the min3() function template
    4: Function template specialization
    5: quicksort function template
  11: C++ Classes
    1: Box class
    2: Box class with inline functions
    3: Constructor with default parameters
    4: A class with two constructors
    5: Conversion constructor function
    6: Member conversion function
    7: Converting classes
    8: Invoking conversions
    9: Contexts of conversions
    10: Conversion in an expression
    11: Manipulating data members through member functions
    12: Conversions with proper data hiding
    13: Friend classes
    14: Friend classes, forward reference
    15: Friend functions in a class
    16: Bridging classes with a friend function
    17: Destructors
    18: Class assignment
    19: this pointer
    20: this pointer and the linked list
    21: Arrays of classes
    22: Constructors for arrays of classes
    23: Destructors for arrays of classes
    24: Static members and the linked list
    25: Static member functions
    26: new and delete with constructors and destructors
    27: Deleting arrays of new classes incorrectly
    28: Correctly deleting arrays of new classes
    29: Class-specific new and delete operators
    30: Class-specific new[] and delete[] operators
    31: Copy constructor
    32: A class with a reference
    33: mutable data members
  12: Overloaded Operators
    1: Overloading the + operator
    2: Overloading + with a nonmember function
    3: Overloading relational operators
    4: Overloading the += operator
    5: Overloading the ++ operator
    6: Overloaded unary minus
    7: Overloaded [ ] subscript operator
    8: Overloaded -> operator
  13: Class Inheritance
    1: Class specialization
    2: Class scope resolution
    3: Multiple derived classes
    4: A class derived from a derived class
    5: Overloaded << and >> operators
    6: A personnel application program
    7: Nonvirtual base class destructor
    8: Virtual base class destructor
  14: Multiple Inheritance
    1: Multiple inheritance
  15: Class Templates
    1: A simple class template
    2: Default values for parameters of a specific type
    3: Bounded array template
    4: Linked-list template for integers
    5: Linked-list template for dates
    6: Class template specialization
    7: Template member function specialization
    8: Template partial specialization
    9: Default template parameters
  17: Introduction to the Standard C++ Library
    1: put() member function
    2: ostream write() function
    3: istream get() member function
    4: get() with a buffer address and length
    5: istream getline() member function
    6: istream read() function
    7: complex class
    8: Deriving from std::exception
  18: Formatted iostreams and the stringstream Classes
    1: Displaying columns of numbers
    2: width() member function
    3: std::setw manipulator
    4: fill() member function
    5: setiosflags and resetiosflags manipulators
    6: setprecision manipulator
    7: ios::fixed flag
    8: std::istringstream
    9: std::ostringstream
    10: std::stringstream
  19: C++ File I/O Streams
    1: File output
    2: Appending to an output file
    3: Avoiding opening an existing file
    4: write() member function
    5: ofstream() member functions
    6: read() member function
    7: Testing end-of-file
    8: seekg() member function
    9: tellg() member function
    10: Reading and writing a stream file
    11: open() and close() member functions
    12: Stream for both input and output
  21: Sequences
    1: Creating a simple vector
    2: Adding elements to a vector
    3: Inserting elements anywhere within a vector
    4: Removing elements from a vector
    5: Removing elements anywhere within a vector
    6: Comparing vectors
    7: Creating a simple deque
    8: Adding elements to a deque
    9: Inserting elements anywhere within a deque
    10: Removing elements from a deque
    11: Removing elements anywhere within a deque
    12: Comparing deques
    13: Creating a simple list
    14: Adding elements to a list
    15: Inserting elements anywhere within a list
    16: Removing elements from a list
    17: Removing elements anywhere within a list
    18: Comparing lists
    19: Managing a stack
    20: Managing a queue
    21: Managing a priority_queue
  22: Associative Containers
    1: Creating a simple set
    2: Adding elements to a set
    3: Removing elements anywhere within a set
    4: Searching a set
    5: Comparing sets
    6: Creating a simple multiset
    7: Adding elements to a multiset
    8: Removing elements anywhere within a multiset
    9: Searching a multiset
    10: Comparing multisets
    11: Creating a simple map
    12: Adding elements to a map
    13: Adding elements to a map using []
    14: Removing elements from a map
    15: Searching a map
    16: Comparing maps
    17: Creating and displaying a multimap
    18: Removing elements from a multimap
    19: Searching a multimap
    20: Comparing multimaps
    21: Manipulating bits in a bitset
    22: Testing bits in a bitset
    23: Comparing bitsets
    24: User-defined predicates
  23: Generic Algorithms
    1: std::adjacent_find()
    2: std::count()
    3: std::for_each()
    4: std::fill()
    5: std::random_shuffle()
    6: std::partition()
    7: std::rotate()
    8: std::sort()
    9: std::partial_sort()
    10: std::nth_element()
    11: std::merge()
    12: std::includes()
    13: std::accumulate()
    14: std::inner_product()
    15: std::partial_sum()
    16: std::adjacent_difference()
  24: The Iterators Library
    1: Input iterators
    2: Output iterators
    3: Forward iterators
    4: Bidirectional iterators
    5: Random-access iterators
    6: Input stream iterators
    7: Output stream iterators
    8: Reverse iterators
    9: Overwriting values with an iterator
    10: Inserting values with an iterator
  25: Exception Handling
    1: Throwing and catching an exception
    2: Multiple catch handlers
    3: A catch-all handler
    4: Rethrowing exceptions
    5: Uncaught exceptions
    6: Catching uncaught exceptions
    7: A calculator with exceptions
  26: Namespaces
    1: std namespace
    2: The using namespace statement
    3: Problems with the using namespace statement
    4: Avoiding the using namespace statement
    5: The namespace definition
    6: Nested namespaces
    7: Namespace aliases
  27: RTTI and New-Style Casts
    1: Downcasting to pointers with dynamic_cast
    2: Downcasting to references with dynamic_cast
    3: Comparing static_cast with C-style casts
    4: reinterpret_cast
    5: const_cast
    6: Examining typeid behavior
  28: Localization
    1: Dates using different locales
    2: Creating mixed locales
    3: streams and the imbue()
    4: Accessing facets

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -