摘要: 系统环境: windows 10 1703编译环境:Visual studio 20176.27sum_all.h#pragma once#include using std::cout;using std::endl;using std::initializer_list;int sum_all(... 阅读全文
posted @ 2017-09-20 09:48 Adam_fei 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 系统环境: windows 10 1703编译环境:Visual studio 20176.16s 被定义成常量字符串引用会更好,否则只能和非常量字符串以及非字面量绑定,很有局限性。可以修改为:bool is_empty(const string& s) { return s.empty(); }6... 阅读全文
posted @ 2017-09-15 10:52 Adam_fei 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 系统环境: windows 10 1703编译环境:Visual studio 20176.8#pragma once#include int adamfact(int val);int fact(int fac1);double Adamabs(double abs1);6.9Chapter6.h... 阅读全文
posted @ 2017-09-14 11:12 Adam_fei 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 系统环境: windows 10 1703编译环境:Visual studio 20176.1实参:定义在主调函数中,用来初始化形参的参数;形参:定义在被调函数中,由其主调函数的实参来初始化。6.2(a) 函数的返回类型和返回变量不相同,可以修改为: string f() { s... 阅读全文
posted @ 2017-09-13 09:57 Adam_fei 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 系统环境: windows 10 1703编译环境:Visual studio 20175.20#include #include using std::cout;using std::endl;using std::cin;using std::string;int main(){ string ... 阅读全文
posted @ 2017-09-07 22:35 Adam_fei 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 系统环境: windows 10 1703编译环境:Visual studio 20175.15(a) 变量 ix 定义在 for 循环的语句头中,因此不能在 for 循环结束继续被 if 语句使用。可以修改为 int ix; for (ix = 0; ix != sz; ++ix) {/*...*... 阅读全文
posted @ 2017-09-06 22:39 Adam_fei 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 系统环境: windows 10 1703编译环境:Visual studio 20175.9#include using std::cout;using std::endl;using std::cin;int main(){ unsigned int acnt = 0, ecnt = 0,... 阅读全文
posted @ 2017-09-05 11:05 Adam_fei 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 注:本文启发自 Pycharm 安装 NumPy, SciPy 等科学计算包(Anaconda)for mac OS X 这篇文章省去了我很多麻烦,因此把它改写成适用于 Windows 系统的,希望能帮助到大家。 本文适用对象:在 Windows 下使用 Pycharm 运行 Python... 阅读全文
posted @ 2017-09-04 23:17 Adam_fei 阅读(554) 评论(0) 推荐(0) 编辑
摘要: 本文适用对象: Windows 操作系统下,已经成功安装了 Visual studio,并且希望在 Windows 系统原生 cmd 窗口中编译 C++ 的人。本文示例操作系统为 Windows 10 1703 64 位,示例 VS 版本为 Visual Studio 2017 Communi... 阅读全文
posted @ 2017-09-04 22:08 Adam_fei 阅读(1501) 评论(0) 推荐(0) 编辑
摘要: 系统环境: windows 10 1703编译环境:Visual studio 20175.1空语句是不执行任何操作的语句,空语句中只包含一个单独的分号;当语法上需要一条语句,但逻辑上不需要的时候,会用到空语句。5.2块就是复合语句,指用花括号括起来的(可能为空的)语句和声明的序列。在程序的某个地方... 阅读全文
posted @ 2017-08-31 11:51 Adam_fei 阅读(177) 评论(0) 推荐(0) 编辑