چه کسانی این کتاب را می‌خوانند

دانشجوعلاقه‌مند یادگیری
کتابخوان حرفه‌ایلذت مطالعه
نویسندهالهام‌گیری

سوالات متداول C++: شامل فهرست

C++ FAQs: Includes index

Cline, Marshall P.; Girou, Mike; Lomow, Greg A

قیمت نهایی

۴۴٬۰۰۰ تومان۴۹٬۰۰۰ تومان۱۰٪ تخفیف
  • تخفیف زمان‌دار−۵٬۰۰۰ تومان

۵٬۰۰۰ تومان صرفه‌جویی نسبت به قیمت اصلی

نسخه اصلی و اورجینال

بلافاصله پس از خرید، فایل کتاب روی دستگاه شما آمادهٔ دانلود است.

تحویل فوری
پرداخت امن
ضمانت فایل
پشتیبانی

مشخصات کتاب

سال انتشار
۱۹۹۸
فرمت
PDF
زبان
انگلیسی
تعداد صفحات
۲۰ صفحه
حجم فایل
۵٫۴ مگابایت
شابک
9780201309836، 9780672333682، 9780672333804، 9781282568990، 9785342309837، 9786612568992، 0201309831، 0672333686، 0672333805، 128256899X، 5342309832، 6612568992

دربارهٔ کتاب

Cover......Page 1 Contents......Page 8 Acknowledgments......Page 34 Part I: Preliminaries......Page 36 FAQ 1.02: What are C++ FAQs?......Page 38 FAQ 1.04: Is this a book about C++ per se?......Page 39 FAQ 1.06: What kind of guidance is given in the answers to these FAQs?......Page 40 FAQ 1.07: What is the electronic FAQ and why buy this book when the electronic FAQ is free?......Page 41 FAQ 1.09: What conventions are used in this book?......Page 42 FAQ 2.02: What are the basics of main()?......Page 46 FAQ 2.03: What are the basics of functions?......Page 47 FAQ 2.05: What are the basics of local (auto) objects?......Page 48 FAQ 2.06: What are the basics of constructing objects using explicit parameters?......Page 50 FAQ 2.07: What are the basics of dynamically allocated (new) objects?......Page 51 FAQ 2.08: What are the basics of local objects within inner scopes?......Page 52 FAQ 2.09: What are the basics of passing objects by reference?......Page 53 FAQ 2.10: What are the basics of passing objects by value?......Page 54 FAQ 2.11: What are the basics of passing objects by pointer?......Page 55 FAQ 2.12: What are the basics of stream output?......Page 56 FAQ 2.13: What are the basics of stream input?......Page 57 FAQ 2.15: What are the basics of using container classes?......Page 59 FAQ 2.16: What are the basics of creating class header files?......Page 61 FAQ 2.17: What are the basics of defining a class?......Page 62 FAQ 2.18: What are the basics of defining member functions?......Page 63 FAQ 2.19: What are the basics of adding a constructor to a class?......Page 64 FAQ 2.20: What are the basics of adding a destructor to a class?......Page 66 FAQ 2.21: What are the basics of defining a class that contains a pointer to an object allocated from the heap?......Page 67 FAQ 2.22: What are the basics of global objects?......Page 70 FAQ 2.23: What are the basics of throwing and catching exceptions?......Page 72 FAQ 2.24: What are the basics of inheritance and dynamic binding?......Page 74 FAQ 3.01: What is the purpose of this chapter?......Page 78 FAQ 3.02: What is the core message of this chapter (and this book)?......Page 79 FAQ 3.04: How can someone manage something they don’t understand?......Page 80 FAQ 3.05: What is the most common mistake on C++ and OO projects?......Page 81 FAQ 3.07: Should an organization use OO on all its projects?......Page 82 FAQ 3.09: What OO language is best?......Page 83 FAQ 3.10: What is the right approach to processes and tools?......Page 84 FAQ 3.11: What is the right approach with off-the-shelf class libraries and frameworks?......Page 85 FAQ 4.01: What is the purpose of this chapter?......Page 86 FAQ 4.02: Why is software architecture important?......Page 87 FAQ 4.04: Should the software architecture be based on the policy of the problem?......Page 88 FAQ 4.06: Are stable requirements desirable?......Page 89 FAQ 4.08: What is a framework?......Page 90 FAQ 4.10: What is an extensible, domain-specific framework?......Page 91 FAQ 4.11: What characteristics make a framework extensible yet domain-specific?......Page 92 FAQ 4.13: How much effort should be expended to support change—that is, how much is extensibility worth?......Page 93 FAQ 4.15: What is the secret to achieving reuse?......Page 94 Part II: Object-Oriented Design......Page 96 FAQ 5.02: Why is the world adopting OO technology?......Page 98 FAQ 5.03: What are some of the benefits of using C++ for OO programming?......Page 99 FAQ 5.04: What are the fundamental concepts of object-oriented technology?......Page 100 FAQ 5.06: What is an object?......Page 101 FAQ 5.07: What are the desirable qualities of an object?......Page 102 FAQ 5.08: How are classes better than the three basic building blocks of procedural software?......Page 103 FAQ 5.09: What is the purpose of composition?......Page 104 FAQ 5.10: What is the purpose of inheritance?......Page 105 FAQ 5.12: How does OO help produce flexible and extensible software?......Page 106 FAQ 5.13: How can old code call new code?......Page 107 FAQ 5.15: Should abstractions be user-centric or developer-centric?......Page 110 FAQ 5.17: What are the consequences of encapsulating a bad abstraction?......Page 111 FAQ 5.18: What’s the value of separating interface from implementation?......Page 112 FAQ 5.19: How can separating interface from implementation improve performance as well as flexibility?......Page 113 FAQ 5.20: What is the best way to create a good interface to an abstraction?......Page 114 FAQ 5.22: Should there be a get and a set member function for each member datum?......Page 115 FAQ 5.24: Should OO be viewed as data-centric?......Page 116 FAQ 6.01: What is the purpose of this chapter?......Page 118 FAQ 6.02: Should users of a member function rely on what the code actually does or on the specification?......Page 119 FAQ 6.03: What are the advantages of relying on the specification rather than the implementation?......Page 120 FAQ 6.04: What are advertised requirements and advertised promises?......Page 121 FAQ 6.05: How are the advertised requirements and advertised promises of the member functions specified?......Page 122 FAQ 6.06: Why are changes feared in development organizations that don’t use specification?......Page 124 FAQ 6.08: What are the properties of a substitutable (backward compatible) change in a specification?......Page 125 FAQ 6.09: How can it be shown that the implementation of a member function fulfills its specification?......Page 126 FAQ 6.10: Is it possible to keep the specification synchronized with the code?......Page 127 FAQ 7.01: What is proper inheritance?......Page 130 FAQ 7.03: What is improper inheritance?......Page 132 FAQ 7.04: Isn’t the difference between proper and improper inheritance obvious?......Page 133 FAQ 7.05: Is substitutability based on what the code does or what the specification promises the code will do?......Page 134 FAQ 7.06: Is it proper to revoke (hide) an inherited public: member function?......Page 135 FAQ 7.07: What is specialization?......Page 136 FAQ 7.08: What do subsets have to do with proper inheritance?......Page 137 FAQ 8.01: Can improper inheritance wreck a project?......Page 138 FAQ 8.04: Is an Ostrich a kind-of Bird?......Page 139 FAQ 8.05: Should an overridden virtual function throw an exception?......Page 141 FAQ 8.06: Can an overridden virtual function be a no-op?......Page 144 FAQ 8.08: Should Circle inherit from Ellipse?......Page 146 FAQ 8.09: What can be done about the asymmetric-circle dilemma?......Page 148 FAQ 8.11: Should Stack inherit from List?......Page 150 FAQ 8.12: Is code reuse the main purpose of inheritance?......Page 152 FAQ 8.14: Is bag-of-apple a kind-of bag-of-fruit, assuming bag-of-fruit allows the insertion of any kind-of fruit?......Page 154 FAQ 8.15: Is parking-lot-for-cars a kind-of parking-lot-for-arbitrary-vehicles (assuming parking-lot-for-vehicles allows parking any kind-of vehicle)?......Page 158 FAQ 8.16: Is array-of Derived a kind-of array-of Base?......Page 159 FAQ 8.17: Does the fact that an array-of Derived can be passed as an array-of Base mean that arrays are bad?......Page 161 FAQ 9.01: Is error handling a major source of fundamental mistakes?......Page 164 FAQ 9.02: How should runtime errors be handled in C++?......Page 165 FAQ 9.04: What is an exception specification?......Page 166 FAQ 9.06: What are the advantages of throw…catch?......Page 167 FAQ 9.07: Why is it helpful to separate normal logic from exception handling logic?......Page 168 FAQ 9.08: What is the hardest part of using exception handling?......Page 171 FAQ 9.09: When should a function throw an exception?......Page 172 FAQ 9.10: What is the best approach for the hierarchy of exception objects?......Page 175 FAQ 9.12: Where do setjmp and longjmp belong in C++?......Page 176 FAQ 10.02: What are the advantages of self-testing objects?......Page 178 FAQ 10.03: What are some common excuses people use for not building self-testing into their objects?......Page 179 FAQ 10.04: What will happen if techniques like those presented here are not used?......Page 180 FAQ 10.06: What is behavioral self-testing?......Page 181 FAQ 10.08: Why should the invariant be captured explicitly?......Page 184 FAQ 10.09: When should the testInvariant() member function be called?......Page 185 FAQ 10.10: What can be done to ensure that an object doesn’t get blown away by a wild pointer?......Page 186 Part III: Language Facilities......Page 188 FAQ 11.01: What is a reference?......Page 190 FAQ 11.03: When can a reference be attached to its referent?......Page 191 FAQ 11.05: What is a local reference?......Page 192 FAQ 11.06: What does it mean to return a reference?......Page 193 FAQ 11.07: What is the result of taking the address of a reference?......Page 194 FAQ 11.09: Why use references when pointers can do everything references can do?......Page 195 FAQ 11.11: When are pointers needed?......Page 196 FAQ 11.12: Why do some people hate references?......Page 197 FAQ 11.13: Does int& const x make sense?......Page 198 FAQ 12.02: Why is new better than good old trustworthy malloc()?......Page 200 FAQ 12.04: Can pointers returned from new be deallocated with free()? Can pointers returned from malloc() be deallocated with delete?......Page 201 FAQ 12.06: Should the pointer returned from new Fred() be checked to see if it is NULL?......Page 202 FAQ 12.07: How can new be convinced to return NULL rather than throw an exception?......Page 203 FAQ 12.08: How can new be set up to automatically flush pools of recycled objects whenever memory runs low?......Page 204 FAQ 12.10: What happens when a pointer is deleted twice?......Page 207 FAQ 12.11: How can an array of things be allocated and deallocated?......Page 208 FAQ 12.13: Can the [] of delete[] p be dropped when p points to an array of some built-in type such as char?......Page 209 FAQ 12.14: How is an object constructed at a predetermined position in memory?......Page 210 FAQ 12.15: How can class Fred guarantee that Fred objects are created only with new and not on the stack?......Page 211 FAQ 12.16: How are objects created by placement new destroyed?......Page 212 FAQ 12.17: In p = new Fred(), does the Fred memory “leak” if the Fred constructor throws an exception?......Page 213 FAQ 12.18: Is it legal (and moral) for a member function to say delete this?......Page 214 FAQ 12.19: After p = new Fred[n], how does the compiler know that there are n objects to be destructed during delete[] p?......Page 215 FAQ 13.01: What is the purpose of inline functions?......Page 218 FAQ 13.03: Are there any special rules about inlining?......Page 219 FAQ 13.05: What are some performance considerations with inline functions?......Page 220 FAQ 13.06: Do inlined functions improve performance?......Page 221 FAQ 13.07: Do inlined functions increase the size of the executable code?......Page 222 FAQ 13.08: Why shouldn’t the inlining decision be made when the code is first written?......Page 223 FAQ 13.09: What happens when a programmer uses an inlined function obtained from a third party?......Page 224 FAQ 13.10: Is there an easy way to swap between inline and non-inline code?......Page 225 FAQ 14.01: How should pointer declarations be read?......Page 228 FAQ 14.02: How can C++ programmers avoid making unexpected changes to objects?......Page 229 FAQ 14.04: Does const allow the compiler to generate more efficient code?......Page 230 FAQ 14.06: Why should const correctness be done sooner rather than later?......Page 231 FAQ 14.07: What’s the difference between an inspector and a mutator?......Page 232 FAQ 14.08: When should a member function be declared as const?......Page 233 FAQ 14.09: Does const apply to the object’s bitwise state or its abstract state?......Page 234 FAQ 14.10: When should const not be used in declaring formal parameters?......Page 235 FAQ 14.11: When should const not be used in declaring a function return type?......Page 236 FAQ 14.12: How can a “nonobservable” data member be updated within a const member function?......Page 237 FAQ 14.13: Can an object legally be changed even though there is a const reference (pointer) to it?......Page 238 FAQ 14.14: Does const_cast mean lost optimization opportunities?......Page 239 FAQ 15.01: What is the purpose of this chapter?......Page 242 FAQ 15.02: What is a namespace?......Page 243 FAQ 15.03: How can code outside a namespace use names declared within that namespace?......Page 244 FAQ 15.04: What happens if two namespaces contain the same name?......Page 245 FAQ 15.05: What are some of the rules for using namespaces?......Page 246 FAQ 15.06: What is name lookup?......Page 247 FAQ 15.08: Can namespaces break code?......Page 248 FAQ 15.10: How do namespaces solve the problem of long identifiers?......Page 250 FAQ 16.02: What are static class members?......Page 252 FAQ 16.03: What is an analogy for static data members?......Page 253 FAQ 16.04: Can inline functions safely access static data members?......Page 255 FAQ 16.05: What is an analogy for static member functions?......Page 257 FAQ 16.07: How is a static member function similar to a friend function?......Page 259 FAQ 16.08: What is the named constructor idiom?......Page 260 FAQ 16.09: How should static member functions be called?......Page 261 FAQ 16.11: How is a const static data member initialized?......Page 262 FAQ 16.12: What is the right strategy for implementing a function that needs to maintain state between calls?......Page 264 FAQ 16.13: How can the function call operator help with functionoids?......Page 265 FAQ 16.14: Is it safe to be ignorant of the static initialization order problem?......Page 266 FAQ 16.15: What is a simple and robust solution to the static initialization order problem?......Page 268 FAQ 16.16: What if the static object’s destructor has important side effects that must eventually occur?......Page 269 FAQ 16.17: What if the static object’s destructor has important side effects that must eventually occur and the static object must be accessed by another static object’s destructor?......Page 270 FAQ 16.18: What are some criteria for choosing between all these various techniques?......Page 272 FAQ 17.02: How does C++ express inheritance?......Page 274 FAQ 17.03: What is a concrete derived class?......Page 276 FAQ 17.04: Why can’t a derived class access the private: members of its base class?......Page 277 FAQ 17.05: How can a base class protect derived classes so that changes to the base class will not affect them?......Page 278 FAQ 17.07: How can a class Y be a kind-of another class X as well as getting the bits of X?......Page 280 FAQ 17.08: How can a class Y get the bits of an existing class X without making Y a kind-of X?......Page 281 FAQ 17.09: How can a class Y be a kind-of another class X without inheriting the bits of X?......Page 282 FAQ 18.02: How are private:, protected:, and public: different?......Page 284 FAQ 18.04: What’s the difference between the keywords struct and class?......Page 285 FAQ 18.06: Why is private: the default access level for a class?......Page 286 FAQ 19.01: What is a friend?......Page 288 FAQ 19.03: What are some advantages of using friend classes?......Page 290 FAQ 19.05: What is a friend function?......Page 291 FAQ 19.06: When should a function be implemented as a friend function rather than a member function?......Page 292 FAQ 19.08: What does it mean that friendship isn’t transitive?......Page 293 FAQ 19.09: What does it mean that friendship isn’t inherited?......Page 295 FAQ 19.10: What does it mean that friends aren’t virtual?......Page 296 FAQ 19.11: What qualities suggest a friend function rather than a member function?......Page 298 FAQ 19.12: Should friend functions be declared in the private:, protected:, or public: section of a class?......Page 300 FAQ 19.13: What is a private class?......Page 301 FAQ 19.14: How are objects of a class printed?......Page 302 FAQ 19.15: How do objects of a class receive stream input?......Page 303 FAQ 20.01: What is the purpose of a constructor?......Page 304 FAQ 20.02: What is C++’s constructor discipline?......Page 305 FAQ 20.04: What is C++’s destructor discipline?......Page 306 FAQ 20.05: What happens when a destructor is executed?......Page 307 FAQ 20.06: What is the purpose of a copy constructor?......Page 308 FAQ 20.07: When is a copy constructor invoked?......Page 309 FAQ 20.08: What is the “default constructor”?......Page 310 FAQ 20.09: Should one constructor call another constructor as a primitive?......Page 312 FAQ 20.11: How can a local object be destructed before the end of its function?......Page 313 FAQ 20.12: What is a good way to provide intuitive,multiple constructors for a class?......Page 316 FAQ 20.13: When the constructor of a base class calls a virtual function, why isn’t the override called?......Page 318 FAQ 20.15: What is the purpose of placement new?......Page 320 FAQ 21.02: What is a virtual member function?......Page 322 FAQ 21.04: How does C++ perform static typing while supporting dynamic binding?......Page 323 FAQ 21.06: What is the purpose of a virtual destructor?......Page 324 FAQ 21.07: What is a virtual constructor?......Page 326 FAQ 21.08: What syntax should be used when a constructor or destructor calls a virtual function in its object?......Page 328 FAQ 21.10: What is a pure virtual member function?......Page 330 FAQ 21.11: Can a pure virtual function be defined in the same class that declares it?......Page 331 FAQ 21.12: How should a virtual destructor be defined when it has no code?......Page 332 FAQ 21.13: Can an ABC have a pure virtual destructor?......Page 333 FAQ 21.15: Should a class with virtual functions have at least one non-inline virtual function?......Page 334 FAQ 22.01: What are constructor initialization lists?......Page 336 FAQ 22.02: What will happen if constructor initialization lists are not used?......Page 337 FAQ 22.04: Is it normal for constructors to have nothing inside their body?......Page 338 FAQ 22.05: How is a const data member initialized?......Page 340 FAQ 22.07: Are initializers executed in the same order in which they appear in the initialization list?......Page 341 FAQ 22.08: How should initializers be ordered in a constructor’s initialization list?......Page 343 FAQ 22.09: Is it moral for one member object to be initialized using another member object in the constructor’s initialization list?......Page 344 FAQ 22.10: What if one member object has to be initialized using another member object?......Page 346 FAQ 22.11: Are there exceptions to the rule “Initialize all member objects in an initialization list”?......Page 347 FAQ 22.12: How can an array of objects be initialized with specific initializers?......Page 348 FAQ 23.01: Are overloaded operators like normal functions?......Page 350 FAQ 23.02: When should operator overloading be used?......Page 351 FAQ 23.03: What operators can’t be overloaded?......Page 352 FAQ 23.04: Is the goal of operator overloading to make the class easier to understand?......Page 353 FAQ 23.05: Why do subscript operators usually come in pairs?......Page 354 FAQ 23.06: What is the most important consideration for operators such as +=, +, and =?......Page 355 FAQ 23.07: How are the prefix and postfix versions of operator++ distinguished?......Page 356 FAQ 23.08: What should the prefix and postfix versions of operator++ return?......Page 357 FAQ 23.09: How can a Matrix-like class have a subscript operator that takes more than one subscript?......Page 358 FAQ 23.10: Can a ** operator serve as an exponentiation operator?......Page 360 FAQ 24.01: What should assignment operators return?......Page 362 FAQ 24.02: What is wrong with an object being assigned to itself?......Page 363 FAQ 24.03: What should be done about self-assignment?......Page 364 FAQ 24.04: Should an assignment operator throw an exception after partially assigning an object?......Page 365 FAQ 24.05: How should the assignment operator be declared in an ABC?......Page 367 FAQ 24.07: What should be returned by private: and protected: assignment operators?......Page 369 FAQ 24.09: How should the assignment operator in a derived class behave?......Page 370 FAQ 24.10: Can an ABC’s assignment operator be virtual?......Page 372 FAQ 24.11: What should a derived class do a base class’s assignment operator is virtual?......Page 374 FAQ 24.12: Should the assignment operator be implemented by using placement new and the copy constructor?......Page 376 FAQ 25.01: What is the purpose of templates?......Page 378 FAQ 25.02: What are the syntax and semantics for a class template?......Page 379 FAQ 25.03: How can a template class be specialized to handle special cases?......Page 381 FAQ 25.04: What are the syntax and semantics for a function template?......Page 383 FAQ 25.05: Should a template use memcpy() to copy objects of its template argument?......Page 384 FAQ 25.06: Why does the compiler complain about >> when one template is used inside another?......Page 386 FAQ 26.02: When should a function catch an exception?......Page 388 FAQ 26.03: Should a catch block fully recover from an error?......Page 389 FAQ 26.04: How should a constructor handle a failure?......Page 391 FAQ 26.06: What should an object do if one of its member objects could throw an exception during its constructor?......Page 392 FAQ 26.08: Should destructors call routines that may throw exceptions?......Page 394 FAQ 26.11: What should the unexpected() function do?......Page 396 FAQ 26.12: Under what circumstances can an overridden virtual member function throw exceptions other than those listed by the specification of the member function in the base class?......Page 398 FAQ 26.13: How might the exception-handling mechanism cause a program to silently crash?......Page 400 FAQ 27.02: What is static type checking?......Page 402 FAQ 27.03: What is dynamic type checking?......Page 403 FAQ 27.04: What is the basic problem with dynamic type checking?......Page 405 FAQ 27.06: Are there better alternatives to dynamic type checking?......Page 406 FAQ 27.08: What is an alternative to dynamic type checking with containers?......Page 408 FAQ 27.10: Given a pointer to an ABC, how can the class of the referent be found?......Page 409 FAQ 27.11: What is a downcast?......Page 411 FAQ 27.12: What is an alternative to using downcasts?......Page 413 FAQ 27.14: Should the inheritance graph of C++ hierarchies be tall or short?......Page 415 FAQ 27.17: What is the purpose of dynamic_cast ()?......Page 416 FAQ 27.20: What does typeid() do?......Page 418 FAQ 27.21: Are there any hidden costs for type-safe downcasts?......Page 419 FAQ 28.01: What are container classes and what are the most common mistakes made with container classes?......Page 422 FAQ 28.03: Should application development organizations create their own container classes?......Page 423 FAQ 28.04: What are some common mistakes with containers of pointers?......Page 424 FAQ 28.06: Surely good old-fashioned char* is an exception, right?......Page 425 FAQ 28.08: Can a Java-like Object class simplify containers in C++?......Page 426 FAQ 28.10: Is it a good idea to use a “best of breed” approach when selecting container classes?......Page 427 FAQ 28.11: Should all projects use C++’s standardized containers?......Page 428 FAQ 28.13: What are the best applications for the standardized C++ sequence container classes?......Page 429 FAQ 28.14: What are the best situations for the standardized C++ associative container classes?......Page 433 Part IV: Topics......Page 436 FAQ 29.01: What is the difference between overloaded functions and overridden functions?......Page 438 FAQ 29.02: What is the hiding rule?......Page 439 FAQ 29.03: How should the hiding rule be handled?......Page 442 FAQ 29.04: What should a derived class do when it redefines some but not all of a set of overloaded member functions inherited from the base class?......Page 444 FAQ 29.05: Can virtual functions be overloaded?......Page 446 FAQ 30.02: What are the Big Three?......Page 450 FAQ 30.03: What happens when an object is destroyed that doesn’t have an explicit destructor?......Page 451 FAQ 30.04: What happens if an object is copied but doesn’t have an explicit copy constructor?......Page 452 FAQ 30.05: What happens when an object that doesn’t have an explicit assignment operator is assigned?......Page 453 FAQ 30.07: Which of the Big Three usually shows up first?......Page 455 FAQ 30.08: What is remote ownership?......Page 456 FAQ 30.10: What if a class owns a referent and doesn’t have all of the Big Three?......Page 457 FAQ 30.11: Are there any C++ classes that help manage remote ownership?......Page 459 FAQ 30.12: Does auto_ptr enforce the Law of the Big Three and solve the problems associated with remote ownership?......Page 461 FAQ 30.13: Are there cases where one or two of the Big Three may be needed but not all three?......Page 463 FAQ 30.14: Are there any other circumstances that might explicitly warrant the Big Three?......Page 464 FAQ 30.15: Why does copying an object using memcpy() cause a program crash?......Page 465 FAQ 30.16: Why do programs with variable-length argument lists crash?......Page 466 FAQ 30.17: Why do programs that use realloc() to reallocate an array of objects crash?......Page 467 FAQ 31.01: When are memory leaks important?......Page 468 FAQ 31.02: What is the easiest way to avoid memory leaks?......Page 469 FAQ 31.03: What are the most important principles for resource management?......Page 471 FAQ 31.04: Should the object that manages a resource also perform operations that may throw exceptions?......Page 472 FAQ 31.05: Should an object manage two or more resources?......Page 473 FAQ 31.07: How should a pointer variable be handled after being passed to delete?......Page 475 FAQ 31.08: What should be done with a pointer to an object that is allocated and deallocated in the same scope?......Page 476 FAQ 31.09: How easy is it to implement reference counting with pointer semantics?......Page 477 FAQ 31.10: Is reference counting with copy-on-write semantics hard to implement?......Page 478 FAQ 31.11: How can reference counting be implemented with copy-on-write semantics for a hierarchy of classes?......Page 481 FAQ 32.01: What is a wild pointer?......Page 486 FAQ 32.03: What does the compiler mean by the warning “Returning a reference to a local object”?......Page 487 FAQ 32.04: How should pointers across block boundaries be controlled?......Page 488 FAQ 32.05: Is the reference-versus-pointer issue influenced by whether or not the object is allocated from the heap?......Page 489 FAQ 32.07: Is it safe to bind a reference variable to a temporary object?......Page 490 FAQ 32.08: Should a parameter passed by const reference be returned by const reference?......Page 491 FAQ 32.10: When is zero not necessarily zero?......Page 492 FAQ 33.01: Is bad performance a result of bad design or bad coding?......Page 496 FAQ 33.02: What are some techniques for improving performance?......Page 497 FAQ 33.03: What is an advantage of using pointers and references?......Page 498 FAQ 33.04: What is a disadvantage of lots of references and pointers?......Page 500 FAQ 33.05: How else can member objects improve performance over pointers?......Page 502 FAQ 33.06: Which is better, ++i or i++?......Page 503 FAQ 33.07: What is the performance difference between Fred x(5); and Fred y = 5; and Fred z = Fred(5);?......Page 505 FAQ 33.09: What is a final class?......Page 506 FAQ 33.10: What is a final member function?......Page 507 FAQ 33.11: How can final classes and final member functions improve performance?......Page 508 FAQ 33.12: When should a nonfinal virtual function be invoked with a fully qualified name?......Page 509 FAQ 33.13: Should full qualification be used when calling another member function of the same class?......Page 510 FAQ 33.14: Do final classes and final member functions cause a lot of code duplication?......Page 511 FAQ 33.16: Can a programming language—rather than just the compiler—affect the performance of software?......Page 513 FAQ 34.02: What is the Component Object Model?......Page 516 FAQ 34.03: What are ActiveX and OLE?......Page 517 FAQ 34.05: What is a “binary object model”?......Page 518 FAQ 34.06: What are the key features of COM?......Page 519 FAQ 34.07: What are GUIDs?......Page 520 FAQ 34.08: Why does COM need GUIDs (and CLSIDs and IIDs)?......Page 521 FAQ 34.09: What is an interface?......Page 522 FAQ 34.10: What is the IUnknown interface?......Page 523 FAQ 34.11: How many ways are there to specify COM interfaces?......Page 525 FAQ 34.12: What are COM classes and COM objects?......Page 527 FAQ 34.13: How hard is it for callers to create and use a COM object?......Page 531 FAQ 34.14: How does COM provide language transparency?......Page 533 FAQ 34.15: How does COM provide location transparency?......Page 534 FAQ 34.16: What types of errors occur due to reference counting?......Page 535 FAQ 34.17: What mechanism does COM define for error handling?......Page 536 FAQ 34.18: How are interfaces versioned?......Page 537 FAQ 34.19: Is COM object oriented?......Page 538 FAQ 34.21: What are the major differences between COM and C++?......Page 539 FAQ 34.22: When should a class be defined as a COM class?......Page 543 FAQ 34.23: What is Automation?......Page 544 FAQ 34.24: What are dispatch interfaces?......Page 545 FAQ 34.25: When should a class expose a Dispatch interface?......Page 546 FAQ 34.26:: How does Automation work?......Page 547 FAQ 34.28: What is a type library?......Page 549 FAQ 34.29: What are the benefits of using type libraries?......Page 550 FAQ 34.31: What are dual interfaces?......Page 551 FAQ 34.32: What limitations are there on dual interfaces?......Page 553 FAQ 34.33: What are OLE custom controls and ActiveX controls?......Page 554 FAQ 34.34: Why do ActiveX controls differ from OLE custom controls?......Page 555 FAQ 34.35: What is a control cont

in A Concise And Direct Question-and-answer Format, c++ Faqs, Second Edition Brings You The Most Efficient Solutions To More Than Four Hundred Of The Practical Programming Challenges You Face Every Day.

Moderators Of The On-line C++ Faq At Comp.lang.c++, Marshall Cline, Greg Lomow, And Mike Girou Are Familiar With C++ Programmers' Most Pressing Concerns. In This Book, The Authors Concentrate On Those Issues Most Critical To The Professional Programmer's Work, And They Present More Explanatory Material And Examples Than Is Possible On-line. This Book Focuses On The Effective Use Of C++, Helping Programmers Avoid Combining Seemingly Legal C++ Constructs In Incompatible Ways.

This Second Edition Is Completely Up-to-date With The Final Ansi/iso C++ Standard. It Covers Some Of The Smaller Syntax Changes, Such As Mutable; More Significant Changes, Such As Rtti And Namespaces; And Such Major Innovations As The C++ Standard Library, Including The Stl. In Addition, This Book Discusses Technologies Such As Java, Corba, Com/com+, And Activex—and The Relationship All Of These Have With C++. These new Features And Technologies Are Iconed To Help You Quickly Find What Is New And Different In This Edition.

each Question-and-answer Section Contains An Overview Of The Problem And Solution, Fuller Explanations Of Concepts, Directions For Proper Use Of Language Features, Guidelines For Best Practices And Practices To Avoid, And Plenty Of Working, Stand-alone Examples. This Edition Is Thoroughly Cross-referenced And Indexed For Quick Access.

Get A Value-added Service! Try Out All The Examples From This Book At Www.codesaw.com. Codesaw Is Afree Online Learning Tool That Allows You To Experiment With Live Code From Your Book Right In Your Browser.

booknews

the Moderators Of The On-line C++ Faq At Comp.lang.c++ Collect And Answer The Questions Most Often Asked By Professional Programmers, Focusing On The Effective Use Of The Programming Language And Avoiding Combining Seemingly Legal Constructs In Incompatible Ways. No Date Is Noted For The First Edition; The Second Takes Account Of The Final Ansi/iso Standard, Major Syntax Changes And Some Of The Smaller Ones, And Recent Innovations. The Explanations Are Fuller Than They Are Able To Provide On Line. Annotation C. By Book News, Inc., Portland, Or.

In a concise and direct question-and-answer format, C++ FAQs, Second Edition brings you the most efficient solutions to more than four hundred of the practical programming challenges you face every day. Moderators of the on-line C++ FAQ at comp.lang.c++, Marshall Cline, Greg Lomow, and Mike Girou are familiar with C++ programmers'most pressing concerns. In this book, the authors concentrate on those issues most critical to the professional programmer's work, and they present more explanatory material and examples than is possible on-line. This book focuses on the effective use of C++, helping programmers avoid combining seemingly legal C++ constructs in incompatible ways. This second edition is completely up-to-date with the final ANSI/ISO C++ Standard. It covers some of the smaller syntax changes, such as'mutable'; more significant changes, such as RTTI and namespaces; and such major innovations as the C++ Standard Library, including the STL. In addition, this book discusses technologies such as Java, CORBA, COM/COM+, and ActiveX—and the relationship all of these have with C++. These new features and technologies are iconed to help you quickly find what is new and different in this edition. Each question-and-answer section contains an overview of the problem and solution, fuller explanations of concepts, directions for proper use of language features, guidelines for best practices and practices to avoid, and plenty of working, stand-alone examples. This edition is thoroughly cross-referenced and indexed for quick access. Get a value-added service! Try out all the examples from this book at www.codesaw.com. CodeSaw is a free online learning tool that allows you to experiment with live code from your book right in your browser.

کتاب‌های مشابه

سوالات متداول ماسونی

سوالات متداول ماسونی

۴۹٬۰۰۰ تومان

سوالات متداول I2C bus. نسخه ۱.۶

سوالات متداول I2C bus. نسخه ۱.۶

۴۹٬۰۰۰ تومان

سوالات متداول اریک کلاپتون: هر آنچه باید درباره اسلوهند بدانید

سوالات متداول اریک کلاپتون: هر آنچه باید درباره اسلوهند بدانید

۴۹٬۰۰۰ تومان

سوالات متداول فوتبال: هر آنچه باید درباره باشگاه‌ها، بازیکنان و رقابت‌ها بدانید

سوالات متداول فوتبال: هر آنچه باید درباره باشگاه‌ها، بازیکنان و رقابت‌ها بدانید

۴۹٬۰۰۰ تومان

سوالات و پاسخ‌های اکسل: یادگیری اکسل با پاسخ‌های کارشناسان به سخت‌ترین سوالات شما، راهنمای جامع برای سوالات متداول اکسل

سوالات و پاسخ‌های اکسل: یادگیری اکسل با پاسخ‌های کارشناسان به سخت‌ترین سوالات شما، راهنمای جامع برای سوالات متداول اکسل

۴۹٬۰۰۰ تومان

سوالات متداول دربارهٔ نسل بیت: هر آنچه باید دربارهٔ هیپسترهای سرangel بدانید

سوالات متداول دربارهٔ نسل بیت: هر آنچه باید دربارهٔ هیپسترهای سرangel بدانید

۴۹٬۰۰۰ تومان

سوالات متداول استار ترک: هر آنچه باید دربارهٔ نخستین سفرهای سفینهٔ انترپرایز بدانید

سوالات متداول استار ترک: هر آنچه باید دربارهٔ نخستین سفرهای سفینهٔ انترپرایز بدانید

۴۹٬۰۰۰ تومان

سوالات متداول در مورد ناحیه گرگ و میش: هر آنچه باید دربارهٔ بعد پنجم و فراتر از آن بدانید

سوالات متداول در مورد ناحیه گرگ و میش: هر آنچه باید دربارهٔ بعد پنجم و فراتر از آن بدانید

۴۹٬۰۰۰ تومان

سوالات متداول درباره صدای موسیقی: هر آنچه باید درباره ماریا، خانواده فون تراپ و چیزهای مورد علاقه‌مان بدانید

سوالات متداول درباره صدای موسیقی: هر آنچه باید درباره ماریا، خانواده فون تراپ و چیزهای مورد علاقه‌مان بدانید

۴۹٬۰۰۰ تومان

سوالات متداول بالیوود: هر آنچه باید درباره بزرگ‌ترین داستان فیلمی که هرگز گفته نشد، بدانید

سوالات متداول بالیوود: هر آنچه باید درباره بزرگ‌ترین داستان فیلمی که هرگز گفته نشد، بدانید

۴۹٬۰۰۰ تومان

راهنمای ساخت دیوار سنگی: راهنمای مبتدی برای ساخت دیوارهای سنگی زیبا، قوی و خیره‌کننده، سوالات متداول، مراحل و بیشتر

راهنمای ساخت دیوار سنگی: راهنمای مبتدی برای ساخت دیوارهای سنگی زیبا، قوی و خیره‌کننده، سوالات متداول، مراحل و بیشتر

۴۹٬۰۰۰ تومان

راهنمای آسان نکات و ترفندها برای ویندوز ۱۰: راهنمایی برای متداول‌ترین سوالات درباره تنظیمات ویندوز ۱۰

راهنمای آسان نکات و ترفندها برای ویندوز ۱۰: راهنمایی برای متداول‌ترین سوالات درباره تنظیمات ویندوز ۱۰

۴۹٬۰۰۰ تومان

قیمت نهایی

۴۴٬۰۰۰ تومان