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.

  • 相关阅读:
    animation
    0201 ---背景 tableview
    0129 ---稳定定的 plist介绍
    0127 userdefault
    0127 数据库 我的专家
    0122 ---清理缓存
    0122 清楚缓存
    0122---screach
    0121 --view 可以当作线
    0119吧 iPhone 屏幕尺寸
  • 原文地址:https://www.cnblogs.com/ecoflex/p/10201933.html
Copyright © 2011-2022 走看看