一个通常的函数调用的例子://声明(一般头文件中)void MyFun(int x);
//此处的申明也可写成:void MyFun( int );int main(int argc, char* argv[]){ MyFun(10);
//这里是调用MyFun(10);函数 return 0;}v...
分类:
其他好文 时间:
2014-07-22 23:06:16
阅读次数:
239
先加密游戏资源然后改cocos2dx底层代码,在读取的时候进行解密 1 unsigned
char* CCFileUtils::getFileData(const char* pszFileName, const char* pszMode,
unsigned long * pSize) 2 { 3...
分类:
其他好文 时间:
2014-05-01 15:38:50
阅读次数:
285
#include "stdio.h"/*int* set(int a,int *c){int
*b;b=malloc(sizeof(int)*3);c[0]=a;c[1]=1+a;c[2]=2+a;b[0]=13;b[1]=14;b[2]=15;return
b;}*/char *set(void)...
分类:
编程语言 时间:
2014-05-01 13:56:31
阅读次数:
306
知识这个东西,真是知道的越多就不知道的越多,C/C++这塘水得多深啊,哈哈。看下面3个片段:1void fun(char a[100])
{2fprintf(stderr, "%s\n", a);3}45int main(void) {6char aa[200] =
"abcdef";7fun(aa...
分类:
其他好文 时间:
2014-05-01 01:44:36
阅读次数:
292
//数据查询create database JXGL; //创建数据库use
JXGL;//使用数据库create table S( Sno char(10) not null unique, Sname char(20) not
null unique, Ssex char(2), Sage in...
分类:
数据库 时间:
2014-05-01 01:01:27
阅读次数:
653
我写的memchr:1 void *memchr(const void *buf, char ch,
unsigned count){2 unsigned int cnt = 0;3 while(*(buf++) != ch && cnt
count)5 ret...
分类:
其他好文 时间:
2014-05-01 00:50:10
阅读次数:
306
DP+贪心优化。 1 #include 2 #include 3 #include 4 5
#define MAXNUM 105 6 7 typedef struct { 8 int exp, deg; 9 } info_st;10 11
info_st infos[MAXNUM]...
分类:
其他好文 时间:
2014-05-01 00:26:21
阅读次数:
330
转载自http://www.360doc.com/content/08/0723/22/26860_1462024.shtml#C语言字符串函数大全函数名:
stpcpy功能: 拷贝一个字符串到另一个用法: char *stpcpy(char *destin, char *source);程序例:#...
分类:
编程语言 时间:
2014-05-01 00:04:56
阅读次数:
572
看了一下Linux 0.11版本write的实现,首先它在标准头文件unistd.h中有定义
int write(int fildes, const char * buf, off_t count);
接下来看write.c
/*
* linux/lib/write.c
*
* (C) 1991 Linus Torvalds
*/
#define __LIBRARY__...
分类:
系统相关 时间:
2014-04-27 21:45:04
阅读次数:
523
很久没有用过二叉树了,最近由于需要用到了,发现很多知识需要巩固了,中间涉及到一个算法就是找任意两个节点的最近祖先。通过本人回顾和演算,最终提出了下面一个方法,网上也有很多其他的方式实现,再次仅对自己好几个小时的工作作个记录和积累吧! 程序是用C语言写的,个人觉得如果用C#实现会更加方便。
首先是数据结构定义:
typedef char TElemType;
typedef bool Statu...
分类:
其他好文 时间:
2014-04-27 21:14:06
阅读次数:
366