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.

  • 相关阅读:
    leetcode-String to Integer (atoi)
    2014薪水
    Ubunt下的软件集
    ubuntu常用软件
    python模块安装
    ubuntu下玩三国杀
    递归函数
    匿名函数
    装饰器函数
    生成器
  • 原文地址:https://www.cnblogs.com/ecoflex/p/10201933.html
Copyright © 2011-2022 走看看