zoukankan      html  css  js  c++  java
  • Modern C++ Course [Lecture 6] {Static, Numbers in memory, Raw C arrays, Non-owning pointers, Classes in memory}

    every object of the same class can equally gets access to the static variable

     

    float has limited precision, eg, float x = 1.0;

    but x = 0.99999987 things like this.

     

     

     

     

    destroy precision of demicals when add huge numbers to small numbers

      set precision(20)

    10M + PI

     

    1M + PI

    length of decimal part is nonlinear....???

    there's no way of knowing in the function what's the size of the array you are passing.

    and you can read any memory you want and this is dangerous

     just make it a rule, never ever create a pointer without initialization.

     if a nullptr is used without further declaration, compiler would show you a "segmentation error"

       

     

    custom objects have variables in memeory stored together, but some padding may be inserted.

  • 相关阅读:
    Live2D 看板娘
    Live2D 看板娘
    Live2D 看板娘
    Live2D 看板娘
    Live2D 看板娘
    Live2D 看板娘
    Live2D 看板娘
    Live2D 看板娘
    Live2D 看板娘
    [转载]MySQL5.5 配置文件 my.ini 1067错误
  • 原文地址:https://www.cnblogs.com/ecoflex/p/10201933.html
Copyright © 2011-2022 走看看