C++
beyondOldLife
这个作者很懒,什么都没留下…
展开
-
C++ Primer Plus(第6版)Chapter3编程题答案
C++ Primer Plus(第6版)Chapter3编程题答案最近在学c++,并且坚持把每章节后面的编程练习题手敲了一遍,收获还蛮多的,想起来申请了CSDN的博客一直都没写,有点尴尬(忘记在gitpages上的那个博客吧,N久没有写新东西了),趁着脑子里还残存着一些MarkDown,于是把代码贴上来吧!原创 2017-12-25 20:14:46 · 380 阅读 · 0 评论 -
C++ Primer Plus(第6版)Chapter 4 编程题答案
C++ Primer Plus(第6版)Chapter 4 编程题答案第1题:// task 1#include <iostream>#include <string>#include <cstring>#include <array>int main(){ using namespace std; cout << "What is your first name? ";原创 2017-12-25 20:32:35 · 213 阅读 · 0 评论 -
C++ Primer Plus(第6版)Chapter 5 编程题答案
C++ Primer Plus(第6版)Chapter 5 编程题答案第1题:#include <iostream>#include <string>#include <array>#include <cstring>using namespace std;// task 1int main(){ int i, j; int sum = 0; cout << "E原创 2017-12-25 20:42:16 · 181 阅读 · 0 评论 -
C++ Primer Plus(第6版)Chapter 6 编程题答案
C++ Primer Plus(第6版)Chapter 6 编程题答案第1题:// task 1#include <iostream>#include <string>#include <cctype>#include <cstring>#include <fstream>#include <cstdlib>using namespace std;int main(){ ch原创 2017-12-25 20:52:25 · 309 阅读 · 0 评论 -
C++ Primer Plus(第6版)Chapter 7 编程题答案
C++ Primer Plus(第6版)Chapter 7 编程题答案第1题:// task 1#include <iostream>#include <cstring>double funct(double, double);int main(){ using namespace std; double x, y; cout << "Enter the x and原创 2018-01-02 10:08:19 · 229 阅读 · 0 评论 -
C++ Primer Plus(第6版)Chapter 8 编程题答案
strcpy_s()函数的第2个参数为字节数而不是字符数!strcpy_s(pt, rs.ct + 1, s); // 注意第2个参数!!!原创 2018-01-02 18:03:02 · 376 阅读 · 0 评论 -
Vector矢量类的实现
本文是C++ primer plus 6一书中Chapter 11里的实例,用类实现了物理上常用的二维矢量,分别体现了其直角坐标表示和极坐标表示,并重载了+,-,*,<< 运算符。并用一个随机漫步的小例子展示了这个二维矢量的作用。具体看代码: 头文件vector.h#ifndef VECTOR_H_#define VECTOR_H_#include <iostream>namespace VEC原创 2018-01-16 20:22:15 · 2152 阅读 · 0 评论