用 #include “filename.h” 格式来引用非标准库的头文件(编译器将 从用户的工作目录开始搜索) ...
分类:
其他好文 时间:
2018-08-03 14:54:29
阅读次数:
410
用 #include <filename.h> 格式来引用标准库的头文件(编译器将从 标准库目录开始搜索)。 ...
分类:
其他好文 时间:
2018-08-03 14:44:59
阅读次数:
137
注释的位置应与被描述的代码相邻,可以放在代码的上方或右方 ,不 可放在下方。 ...
分类:
其他好文 时间:
2018-08-03 14:11:09
阅读次数:
132
~~没有复杂结构甚至不长但是写起来就很想死的代码类型~~ 原理非常简单,就是用先用单调队列处理出mn1[i][j]表示i行的j到j+k 1列的最小值,mx1[i][j]表示i行的j到j+k 1列的最大值 然后就变成求单列最大最小值,用上面同样的方法处理出对于列的mn2mx2即可 cpp includ ...
分类:
其他好文 时间:
2018-08-03 01:08:17
阅读次数:
145
C++ 语言中的重载、内联、缺省参数、隐式转换等机制展现了很多优点,但是这些 优点的背后都隐藏着一些隐患。正如人们的饮食,少食和暴食都不可取,应当恰到好处。 我们要辨证地看待 C++的新机制,应该恰如其分地使用它们。 虽然这会使我们编程时多 费一些心思,少了一些痛快,但这才是编程的艺术。 ...
分类:
编程语言 时间:
2018-08-02 13:16:18
阅读次数:
206
运算符 new 使用起来要比函数 malloc 简单得多,例如: int *p1 = (int *)malloc(sizeof(int) * length); int *p2 = new int[length]; 这是因为 new 内置了 sizeof、类型转换和类型安全检查功能。 对于非内部数据类 ...
分类:
其他好文 时间:
2018-08-02 12:53:12
阅读次数:
150
1 #include 2 3 /* run this program using the console pauser or add your own getch, system("pause") or input loop */ 4 using namespace std; 5 int main(... ...
分类:
其他好文 时间:
2018-08-02 11:29:47
阅读次数:
124
1 #include 2 3 /* run this program using the console pauser or add your own getch, system("pause") or input loop */ 4 using namespace std; 5 int main(... ...
分类:
其他好文 时间:
2018-08-02 11:28:45
阅读次数:
122
1 #include 2 #include 3 /* run this program using the console pauser or add your own getch, system("pause") or input loop */ 4 using namespace std; 5 ... ...
分类:
其他好文 时间:
2018-08-02 11:28:03
阅读次数:
174
1 #include 2 #include 3 /* run this program using the console pauser or add your own getch, system("pause") or input loop */ 4 using namespace std; 5 ... ...
分类:
编程语言 时间:
2018-08-02 11:26:45
阅读次数:
184