- 博客(20)
- 资源 (2)
- 收藏
- 关注
转载 ffmpeg rgb转yuv 生成H264文件
BITMAPFILEHEADER * test = NULL;FILE * file[5];char * szTxt[5];int nWidth = 0;int nHeight = 0;int nDataLen = 0;int nLen;char csFileName[20];int fileI;for (fileI = 1; fileI {sprint
2017-11-16 16:57:13
1485
1
原创 从一个图片读数据,由这个数据来填充新建图片文件
FILE * file1;char * szTxt;int nLen;file1 = fopen("f:\\temp\\test.bmp", "rb");fseek(file1, 0, SEEK_END);nLen = ftell(file1);//nlen文件长度fseek(file1, 0, SEEK_SET);szTxt = (char *)malloc(nLen
2017-11-16 10:48:21
379
原创 vs2010,MFC 使用对话框报错
现象: 代码中并不显红,且该对话框的控件双击均可以到达响应函数中,依然报错:error C2065:“IDD_DIALOG6”:未声明的标识符 解决办法:在stdafx.h中包含Resouce.h即可
2017-09-28 10:31:07
635
转载 linux下交叉编译放到arm板运行出错:-sh: ./no: not found
交叉编译时静态编译就可以了,之前不知道静态编译的时候做了什么,然后出现新的错误,然后改新错误,然后又出现新的错误,连段错误都出来了好吧不吐槽了这是我找到答案的地方:http://blog.youkuaiyun.com/aguangg_6655_la/article/details/53239281
2017-04-27 15:06:41
555
原创 自定义字符串定长拷贝函数my_strncpy()
char *my_strncpy(char*dest,constchar *ptr,intn){ char *temp = dest; int i = 0; while(*ptr != '\0') { if(i == n) { break; }
2017-04-26 14:59:00
859
原创 自定义字符串定长拼接函数my_strncat()
char *my_strncat(char*dest,constchar *ptr,intn){ char *temp = dest; while(*temp != '\0') { temp++; } int i = 0; while(*ptr != '\0') { i
2017-04-26 14:44:20
1121
原创 自定义字符串拼接函数my_strcat()
char *my_strcat(char*dest,constchar *ptr){ char *temp = dest; while(*temp != '\0') { temp++; } while(*ptr != '\0') { *temp = *ptr; te
2017-04-26 14:39:32
2786
原创 自定义字符串定长大小判断my_strncmp()
int my_strncmp(char*dest,const char *ptr,int n){ int i = 0; while(*ptr != '\0') { if(i == n) { break; } i++;
2017-04-26 12:03:36
647
原创 字符串处理://在母串中查找子串,只保留子串之前的数据
//在母串中查找子串,只保留子串之前的数据char * myStrSubEnd(char *str,const char *dest){ char *tmpStr = str; int inde = 0; while(*tmpStr != '\0') { if((*tmpStr) == (*dest)) {
2017-04-26 11:41:24
862
原创 字符串处理://在母串中查找子串,只保留子串之后的数据
//在母串中查找子串,只保留子串之后的数据char * clientDialog::myStrSubFront(char *str,const char *dest){ char *tmpStr = str; // int inde = 0; while(*tmpStr != '\0') { if((*tmpStr) == (*d
2017-04-26 11:39:08
769
原创 字符串遇空格截断
//去空,将"123 "变成"123"void deleteEndNull(char * str){ char * temp = str; int count = 0; while((*temp) != ' ' && count strlen(str)) { count++; temp++;
2017-04-26 11:35:37
1847
原创 自定义字符串大小判断my_strcmp()
int my_strcmp(char *dest,char *ptr){ while(*ptr != '\0') { if(*ptr == *dest) { ptr++; dest++; } else if(*dest > *ptr)
2017-04-26 11:31:48
693
原创 自定义字符串拷贝my_strcpy()
char *my_strcpy(char *dest,char *ptr){ char *temp = dest; while(*ptr != '\0') { *temp = *ptr; temp++; ptr++; } *temp = '\0'; return ptr;}
2017-04-26 11:29:36
615
转载 输入一个字符串,计算字符串中子串出现的次数
输入一个字符串,计算字符串中子串出现的次数字符串:“hellosdfdshellodsfdshello”子串:“hello”代码如下:#include #include int main(){ char * c = "hellosdfdshellodsfdshello"; char * d = "hello"; int n; in
2016-04-23 19:54:17
13702
3
原创 利用递归方法实现一个函数,该函数能够实现n的阶乘,即 n! = n*(n-1)*…*3*2*1
利用递归方法实现一个函数,该函数能够实现n的阶乘,即n! = n*(n-1)*…*3*2*1代码如下:#include int main(){ int n; int i; int s = 1; printf("please input n:\n"); scanf("%d",&n); printf("%d!=",
2016-04-23 19:49:00
15884
原创 用C语言实现简单的计算器(加、减、乘、除)
使用一个.c文件完成加减乘除的功能代码如下:#include int add(int a,int b);int sub(int a,int b);int mul(int a,int b);int div(int a,int b);int main(){ int a; int b; char c; printf("please
2016-04-23 19:37:37
16392
原创 用C语言打印出杨辉三角
用C语言打印出杨辉三角 杨辉三角形是形如:11 11 2 11 3 3 11 4 6 4 1的三角形,其实质是二项式(a+b)的n次方展开后各项的系数排成的三角形,它的特点是左右两边全是1,从第二行起,中间的每一个数是上一行里相邻两个数之和。代码如下:#include int main(){
2016-04-23 19:31:17
1058
原创 输出1~100之内的素数及素数个数简单程序
#include int main(){ int i; int j; int k = 1; for(i = 1; i { if(i == 2) { printf("%d\n",i); } else {
2016-04-18 21:34:46
3907
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人