#include #include #include #include #pragma
comment(lib, "OpenCL.lib")const char * loadfile(const char * fileName){
std::ifstream fs(fileName, std...
分类:
其他好文 时间:
2014-05-29 00:21:15
阅读次数:
246
七种qsort排序方法一、对int类型数组排序intnum[100];Sample:intcmp(constvoid*a,constvoid*b){return*(int*)a-*(int*)b;}qsort(num,100,sizeof(num[0]),cmp);二、对char类型数组排序(同in...
分类:
其他好文 时间:
2014-05-28 16:55:43
阅读次数:
238
GetProto()->ItemLevel 判断装备等级
HandleBattleFieldPortOpcode 进入战场,。 bool
ChatHandler::HandlegetHitemlvlCommand(const char* args){ Player* target; ...
分类:
其他好文 时间:
2014-05-28 04:11:14
阅读次数:
249
刚才学了gethostbyname函数,这个gethostbyaddr函数的作用是通过一个IPv4的地址来获取主机信息,并放在hostent结构体中。#include
struct hostent * gethostbyaddr(const char * addr, socklen_t len,.....
分类:
其他好文 时间:
2014-05-28 01:46:42
阅读次数:
331
#include #include #include #include int
main(int argc, char **argv){/* 目的编码, TRANSLIT:遇到无法转换的字符就找相近字符替换 * IGNORE
:遇到无法转换字符跳过*///char *encTo = "UNICODE...
分类:
编程语言 时间:
2014-05-28 00:44:56
阅读次数:
619
main.c 1 #include 2 #include"2401.h" 3 4 #define
uint unsigned int 5 #define uchar unsigned char 6 7 sbit KEY8=P3^7; //发送按键 8
sbit beep=P2^3;//...
分类:
其他好文 时间:
2014-05-27 23:56:22
阅读次数:
599
发布一段C代码,用于连接指定的KVM宿主机器,获得该宿主机器的配置信息,以及该主机上所有的虚拟主机列表、状态及配置信息:#include
#include #include void ListDom(virConnectPtr conn){ char **inactiveDom;
virDoma.....
1 #include 2 #include 3 #include 4 5 int
i,j,n,a,b,c,d,temp1,temp2,temp3,temp4,temp5,temp6; 6 char a1,c1; 7 8 void
solve() 9 {10 temp1=a+b;1...
分类:
其他好文 时间:
2014-05-27 17:19:11
阅读次数:
340
1、const char* p: p is a pointer to const char(char
const* p 一样) 意思就是不能通过p指针来修改p指向的内容(但是内容可以修改)。2、char* p : p is a pointer to char
意思就是可通过p指针来修改p指向的内容3...
分类:
其他好文 时间:
2014-05-26 17:30:58
阅读次数:
153
征服C指针:P70#include "stdio.h"char *int_to_str(int
int_value){ static char buf[20]; sprintf(buf,"%d",int_value); return buf;}int
main(){ c...
分类:
编程语言 时间:
2014-05-26 17:07:52
阅读次数:
249