/*
* hdu AC Me
* date 2014/5/13
* state AC
*/
#include
#include
#include
#include
using namespace std;
const int MAXN=100001;
char Arr[MAXN];
int cnt[26];
int main()
{
//cout << "Hello wor...
分类:
其他好文 时间:
2014-05-15 06:16:24
阅读次数:
247
用域名获取IP地址或者用IP获取域名
#include
#include
#include
int main(int argc,char **aggv)
{
struct hostent *host;
char hostname[]="www.163.com";
char hostname2[]="www.baidu.com";
s...
分类:
系统相关 时间:
2014-05-15 06:15:07
阅读次数:
406
#include
#include
using namespace std;
class Teacher
{
public:
Teacher(string nam,int ag,char s,string ad,int num,string t)
{
name=nam;
age=ag;
sex=s;
...
分类:
其他好文 时间:
2014-05-15 04:32:56
阅读次数:
262
//***************************************************************
//结构体:简单的静态链表
#include
#include
#define NULL 0
#define SIZE 10
struct student
{
char num[SIZE];
float score;
struct student *next;
...
分类:
编程语言 时间:
2014-05-15 02:55:09
阅读次数:
359
#include #include #include #include int main(int
argc, char **argv){ /* 这个是给str分配存储字符串地址的空间 */ char **str =
(char**)malloc(sizeof(char*)*256); /* 这个是给...
分类:
系统相关 时间:
2014-05-15 02:05:47
阅读次数:
313
//Processing date
struct tm time;
std::string date;
char dateBuff[128] = {0};
time.tm_year = atoi(md_date.getString().substr(0,4).c_str()) - 1900;
time.tm_mon = atoi(md_date.getString().subs...
分类:
其他好文 时间:
2014-05-14 21:52:15
阅读次数:
248
#include
#include
void main(int argc,char *argv[])
{
FILE *in,*out;
if(argc!=3)
{
printf("you forgot to enter a file name\n");
exit(0);
}
if((in=fopen(argv[1],"r"))==NULL)
{
printf("cannot...
分类:
编程语言 时间:
2014-05-14 21:37:56
阅读次数:
321
staticint_osip_message_parse(osip_message_t*sip,constchar*buf,size_tlength,intsipfrag){inti;constchar*next_header_index;char*tmp;char*beg;tmp=osip_malloc(length+2);if(tmp==NULL){OSIP_TRACE(osip_trace(__FILE__,__LINE__,OSIP_ERROR,NULL,"Couldnotallocatememory..
分类:
其他好文 时间:
2014-05-14 16:06:25
阅读次数:
296
#include
#include
#include
#include
#include
#include
using namespace std;
struct ssss
{
ssss *c[26];
int n,v;
}*s;
void insert(char *str,int v)
{
int i,j,k,l;
ssss *p,*q;
p=...
分类:
其他好文 时间:
2014-05-14 15:06:54
阅读次数:
357
/*
* hdu OpenDoorManAndCloseDoorMan
* date 2014/5/13
* state AC
*/
#include
#include
#include
#include
using namespace std;
struct DoorMan
{
char name[20];
int startH,startM,startS;
...
分类:
其他好文 时间:
2014-05-14 14:58:40
阅读次数:
247