![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
c++
士多碧莉
不要做程序猿,要做工程狮,吼吼
展开
-
解决error: ‘to_string’ was not declared in this scope
to_string是c++11的新方法 可以将数值类型很轻松的转换为字符串类型。官方的解释如下: Convert numerical value to string Returns astringwith the representation ofval.使用方法如下: string to_string (int val);str...原创 2019-12-12 14:40:49 · 14149 阅读 · 2 评论 -
c++11 数据类型 字节与位 新的初始化方式 上溢和下溢
由于一直忘记字节和位的换算。。所以记录一下参考自 c++ primer plus计算机内存由一些叫做位的单元组成,不同数据类型通过不同的位数来存储值。字节(byte)通常指的是8位的内存单元,1Byte = 8 bit举个栗子:1KB = 2^10Byte = 1024 Byte = 1024 字节 = 1024 * 8 bit = 8192 位总所周知计算...原创 2019-12-02 14:54:12 · 854 阅读 · 0 评论