疑问void max(const int x, const int y);void 
max(int x, int 
y);为什么报错:重复声明解释“这种差异并不影响传递至函数的对象...其原因在于实参传递的方式。复制形参时并不考虑形参是否为const---函数操纵的只是副本。函数无法修改实参...这两...
                            
                            
                                分类:
其他好文   时间:
2014-07-22 23:16:32   
                                阅读次数:
297
                             
                    
                        
                            
                            
                                一、位运算应用:1、判断某一位是否为12、只改变其中某一位,而保持其它位都不变位运算操作:1、&按位与(双目):将某变量中的某些位清0(与0位与)且同时保留其它位不变(与1位与);获取某变量中某一位(与其位与后判断是否为该数)2、|按位或(双目):将某变量中的某些位置1(与1位或)且保留其它位不变3...
                            
                            
                                分类:
其他好文   时间:
2014-07-22 23:10:13   
                                阅读次数:
279
                             
                    
                        
                            
                            
                                先加密游戏资源然后改cocos2dx底层代码,在读取的时候进行解密 1 unsigned 
char* CCFileUtils::getFileData(const char* pszFileName, const char* pszMode, 
unsigned long * pSize) 2 { 3...
                            
                            
                                分类:
其他好文   时间:
2014-05-01 15:38:50   
                                阅读次数:
285
                             
                    
                        
                            
                            
                                题目来源:http://poj.org/problem?id=3384分析:用半平面交将多边形的每条边一起向“内”推进R,得到新的多边形(半平面交),然后求多边形的最远两点。代码如下:const 
double EPS = 1e-10;const int Max_N = 105 ;struct Poi...
                            
                            
                                分类:
其他好文   时间:
2014-05-01 14:35:31   
                                阅读次数:
528
                             
                    
                        
                            
                            
                                一、用strtok函数进行字符串分割原型:char *strtok(char *str, 
const char 
*delim);功能:通过一系列调用来分解字符串为一组字符串。参数说明:str为要分解的字符串,delim为分隔符字符串。返回值:从str开头开始的一个个被分割的串。当没有被分割的串时则返...
                            
                            
                                分类:
其他好文   时间:
2014-04-30 21:30:39   
                                阅读次数:
518
                             
                    
                        
                            
                            
                                半平面交模板const double pi= acos(-1.0);#define 
arc(x) (x / 180 * pi)const double EPS = 1e-8;const int Max_N = 105;struct Point{ 
double x,y; Point(){}...
                            
                            
                                分类:
其他好文   时间:
2014-04-30 17:00:01   
                                阅读次数:
621
                             
                    
                        
                            
                            
                                char* 转 float:double atof (const char* str);/* atof 
example: sine calculator */#include /* printf, fgets */#include /* atof 
*/#include ...
                            
                            
                                分类:
其他好文   时间:
2014-04-30 13:44:13   
                                阅读次数:
410
                             
                    
                        
                            
                            
                                #includeint getopt(int argc,char *const 
argv[],const char *optstring); extern char *optarg; extern int 
optind,opterr,optopt;optstring为一个字符列表,每个字符代表一个单...
                            
                            
                                分类:
编程语言   时间:
2014-04-29 19:07:30   
                                阅读次数:
568
                             
                    
                        
                            
                            
                                poj 1279 求半平面交的 
面积题目来源:http://poj.org/problem?id=1279分析: 求半平面交的 面积代码如下:const double EPS = 
1e-8;const int Max_N = 1505;struct Point{ double x,y; ...
                            
                            
                                分类:
其他好文   时间:
2014-04-29 16:35:46   
                                阅读次数:
499
                             
                    
                        
                            
                            
                                qsort(&g_AMTBuf[g_dwAMTLenth], m_nCount, 
sizeof(12), Compare);参数说明:1.待排序数组首地址;2.数组中待排序元素数量;3.各元素的占用空间大小;4.指向函数的指针。1 int 
Compare(const void *a,const vo...
                            
                            
                                分类:
其他好文   时间:
2014-04-29 09:12:46   
                                阅读次数:
398