Содержание
- 2. Permutation with using standard function
- 3. Next Lexicographic permutation
- 4. Upgraded solution
- 5. Get permutation by sequence number
- 6. Objects layout in memory
- 7. Alignment struct Currency { char firstCurrency; double firstValue; char secondCurrency; double secondValue; char baseCurrency; int baseCurrencyId;
- 8. Alignment struct Currency { double firstValue; double secondValue; int baseCurrencyId; char firstCurrency; char secondCurrency; char baseCurrency;
- 9. Inheritance class Base { int base; char otherB; }; class Derived : public Base { char
- 10. Multiple Inheritance class BaseA { int fieldA; }; class BaseB { int fieldB; }; class Derived
- 11. Multiple Inheritance Derived* pDer = new Derived; BaseA* pBaseA = pDer; BaseB* pBaseB = pDer;
- 12. Multiple Inheritance
- 13. VIRTUAL TABLE
- 14. Non-virtual multiple inheritance -fdump-class-hierarchy
- 15. Virtual Inheritance -fdump-class-hierarchy
- 16. Is it right output? pA is B: B::foo() B::bar() A::baz() pA is C: С::foo() B::bar() A::baz()
- 17. pA is B: B::foo() B::bar() A::baz() pB is C: C::foo() C::bar() A::baz() Right output:
- 18. Virtual table C++ uses a special form of late binding known as the virtual table. The
- 19. Proof: g ++ -fdump-class-hierarchy option
- 20. Virtual table
- 22. Dynamic_cast
- 23. Dynamic_cast Syntax: dynamic_cast ( expression ) Example: class Base{ virtual void Print() { cout void SpecificPrint()
- 25. Скачать презентацию