zoukankan      html  css  js  c++  java
  • overview

    [1] Don’t panic! All will become clear in time; 
    [2] You don’t have to know every detail of C++ to write good programs;
    [3] Focus on programming techniques, not on language features;

    there are six parts of this  book:

    1.Introduction  ch1-3

        overview

    2.Part1  ch4-9  

        a tutorial introduction to C++’s built-in types and the
        basic facilities for constructing programs out of them.

    3.Part2  ch10-15

        a tutorial introduction to object-oriented and generic programming

        using C++.

    4.Part3  ch16-22

        present the C++ standard library.

    5.Part4  ch23-25  

        discuss design and software development issues

    6.Appendices  

        A-E provide language technical details

     

    Advice:

    [1] When you program, you create a concrete representation of the ideas in your solution to some
    problem. Let the structure of the program reflect those ideas as directly as possible:
      [a] If you can think of ‘‘it’’ as a separate idea, make it a class.
      [b] If you can think of ‘‘it’’ as a separate entity, make it an object of some class.
      [c] If two classes have a common interface, make that interface an abstract class.
      [d] If the implementations of two classes have something significant in common, make that
        commonality a base class.
      [e] If a class is a container of objects, make it a template.
      [f] If a function implements an algorithm for a container, make it a template function implementing    
        the algorithm for a family of containers.
      [g] If a set of classes, templates, etc., are logically related, place them in a common namespace.

    [2] When you define either a class that does not implement either a mathematical entity like a
    matrix or a complex number or a low-level type such as a linked list:
      [a] Don’t use global data (use members).
      [b] Don’t use global functions.
      [c] Don’t use public data members.
      [d] Don’t use friends, except to avoid [a] or [c].
      [e] Don’t put a ‘‘type field’’ in a class; use virtual functions.
      [f] Don’t use inline functions, except as a significant optimization.

  • 相关阅读:
    java语法基础
    向linux内核增加一个系统调用-1
    dp-矩阵连乘
    struct和typedef struct
    Ubuntu安装Chrome及hosts修改
    c++primer-p100.用迭代器进行二分法搜索
    c++primer-p101.ex3.24
    c++ vector用法和迭代器
    Bytes和bits的区别(字节和位的区别)
    基于R语言的数据分析和挖掘方法总结——中位数检验
  • 原文地址:https://www.cnblogs.com/byking/p/3164669.html
Copyright © 2011-2022 走看看