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

I have written the according code, it shows 1 when ```cout

file本身就是一个智能指针了,直接return即可。 答案中用make_shared,但是编写有误,不能用file初始化此对象,要用也是用*file。

有个取反符合漏掉了,正确答案是-7296

没有做到题目中将 “第一段”字符串变为大写 的要求。

练习2.37 decltype(a=b) d = a

题中要求挑选长度较短的string对象而非大小较小的string对象

typedef string Type; Type initVal(); //Type为string class Exercise { public: typedef double Type;//type为double Type setVal(Type);//type为double Type initVal(); //type为double private: int val; }; Type Exercise::setVal(Type parm) {//第一个type为string,第二个type为double ,此处有错误第一个type应改为Exercise::Type val = parm...