
程序设计算法(C&C++)
Coder_小张
无-NULL
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
n 的阶乘 C 语言版(大数)
#include #include //程序以四个数字为一组//返回值为结果的位数int factorial(int n,long *result) { int i,j; //循环变量 int c; //进位数 int m = 0; //记录数组的下标 int w; //记录结果的位数 result[0] = 1; for(i = 1; i <原创 2014-02-11 20:04:08 · 843 阅读 · 0 评论 -
大数乘法(大数乘小数)c语言版
#include #include #define N 100 //数组的大小,可以设置//返回数组的长度int mult(const char *a, int m, char *result){ int i; //循环变量 int flag; //进位的标志 int num; int c = 0; //进位数 int Len = strlen(a)原创 2014-02-11 20:58:01 · 1547 阅读 · 0 评论 -
C++定时器SetTimer实际ID说明
C++定时器SetTimer 函数原型:UINT_PTR SetTimer( HWND hWnd, // 窗口句柄 UINT_PTR nIDEvent, // 定时器ID,多个定时器时,可以通过该ID判断是哪个定时器 UINT uElapse, // 时间间隔,单位为毫秒 TIME原创 2017-09-24 16:09:22 · 1944 阅读 · 0 评论 -
使用开源jpeg库保存jpg图像
#define SafeDeleteArr(pArr) {delete[] (pArr); (pArr) = 0;}bool RGBSavePic(uint8_t *pRGBBuffer, int iFrame, int width, int height){ //jpeg 压缩对象 struct jpeg_compress_struct cinfo; //错误器 struct jpe...原创 2018-03-08 13:00:56 · 1680 阅读 · 0 评论 -
C++构造函数详解
一.构造函数分类0.无参数构造函数(默认构造函数)如果创建一个类没有任何构造函数,系统会自动生成一个无参数的构造函数,函数为空,什么都不做1.普通构造函数(重载构造函数)普通构造函数可以有各种参数形式,一个类可以有多个一般构造函数,前提是参数的个数或者类型不同(基于c++的重载函数原理)2. 拷贝构造函数(复制构造函数)拷贝构造函数的参数为类对象本身的引用,用于...原创 2019-07-08 22:57:26 · 1120 阅读 · 0 评论