Cpp_Primer_Answers icon indicating copy to clipboard operation
Cpp_Primer_Answers copied to clipboard

《C++ Primer》第五版中文版习题答案

Results 60 Cpp_Primer_Answers issues
Sort by recently updated
recently updated
newest added

练习12.17 有点错误,因为p2是用pi2初始化的,因此实际上p2也是指向ix,等价于(d)IntP p3(&ix) 同时,规范了一下“合法”这个词的含义,即可以编译

`static double rate = 6.5` 虽然说是少了一个constexpr,但是在书270页下面也写了为静态成员提供const 整数 类型的类内初始值,6.5不算是整型吧应该。虽然可以编译成功,但是这个情况算是书上的一个错误吗?我看英文版的翻译也是integral type

应该只有一个地方避免了拷贝 ```c++ Mystring baz() { Mystring ret("world"); return ret; // avoided } ```

vector iv = {1, 2, 3, 2, 5, 7, 8, 9, 10};

经验证,输出应为`*/`

![image](https://user-images.githubusercontent.com/84135487/190142274-80c3a5ce-1ac9-495e-84fc-073856d7806a.png) 原题为求~"q"

练习2.14的答案在程序上跑出的是10 45