上一页 1 ··· 18 19 20 21 22
摘要: C++常用库函数 1.缓冲区操作函数 函数名:memchr 函数原型:void *memchr(const void *buf,int c,sizet count); 参数:buf 缓冲区的指针;c 查找的字符;count 检查的字符个数。 所需头文件:<cstring> 功能:查找 buf 的前 阅读全文
posted @ 2018-12-01 11:09 darrrr 阅读(5350) 评论(0) 推荐(0) 编辑
摘要: 基本代码: #include <iostream>#include <algorithm>using namespace std;int PowerMod(long long a, long long b, int n){ int ans=1; a=a%n; while(b>0) { if(b%2= 阅读全文
posted @ 2018-12-01 10:38 darrrr 阅读(143) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; void swap(int &a,int &b) { int temp=a; a=b; b=temp; } void pai_xu(int a[],int m,int n) { if(m==n) { for(int i 阅读全文
posted @ 2018-11-22 19:49 darrrr 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 恢复内容开始 1.“//”表示行注释 一对“/*”和“*/”中间的内容是注释。 2.“}”之后无分号 3.“=”为赋值 “==”才是等于 赋值为:右给左 数据类型:以左面为准 4.printf scanf <cstdio> cin cout <iostream> 5.“%”模运算必须都是整型数 + 阅读全文
posted @ 2018-11-21 21:15 darrrr 阅读(113) 评论(0) 推荐(0) 编辑
上一页 1 ··· 18 19 20 21 22