ÎÒÏë»ñµÃµ±Ç°µÄʱ¼ä£¬windows mobileÉÏÄÜÓÃtime_t time(time_t *timer)º¯Êý£¬Ìáʾlnk´íÎó¡£ÎªÊ²Ã´²»ÄÜÓÃÄØ£¿ ÐèÒªÔö¼ÓʲôÁ¬½Ó¿âÂð£¿Ãû×ÖÊÇʲô£¿
Çå³þµÄ¼ÇµÃ c¿âµÄtime_tÊÇ¿ÉÒÔʹÓõģ¬Ó¦¸ÃÊÇÆäËûµÄÎÊÌâµ¼Öµġ£
ÓÃGetLocalTime°É£¬ÄǸötime£¨£©È·Êµ²»ÄÜÓá£
Èç¹ûwindows mobileÊÇGÍøµÄÊÖ»ú£¬Ê±¼ä¿ÉÄÜÊDz»×¼È·µÄ
......
RT
c³ÌÐòÉè¼ÆÓïÑÔ
C³ÌÐòÉè¼Æ̶ºÆÇ¿µÄÄDZ¾
c³ÌÐòÉè¼ÆÓïÑÔ
cÏÝÚåÓëȱÏÝ
CºÍÖ¸Õë
C primer plus
cר¼Ò±à³Ì
CÓïÑÔÖ®ËÄÊéÎå¾
ǧÍò²»Òª¿´Ì·ºÆÇ¿µÄ£¬»áº¦ËÀÄã¡£
Ö±½Ó¿´The C Programming Language.
ÒýÓÃ
C³ÌÐòÉè¼Æ̶ºÆÇ¿µÄÄDZ¾
4Â¥ÁÁÁË
C³ÌÐòÉè¼Æ̶ºÆÇ¿µÄÄDZ¾Ó¦¸ÃÊʺÏÄã°É
Î ......
1.Ϊʲô¶¨Ò庯Êýʱ£ºfun1 ¿ÉÒÔÕýÈ·µÄ·µ»Ø¶øfun2²»ÐУ¿
char * fun1()
{
char *p = "haha";
return p;
}
char * fun2()
{
char p[] = "haha";
return p;
}
ÊÇ·ñ¿ÉÒÔÕâÑùÀí½â£º
fun1ÖÐpÊÇÒ»¸ölocalµÄ±äÁ¿£¬ËüÖ¸ÏòÒ»¸ö¿Õ¼ä£¬¿Õ ......
C/C++ code:
#include <stdio.h>
typedef struct node{
int *key;
int length;
}node;
void insert(node &temp,int n)
{
int i,j;
for(i=0;i<=temp.length;i++)
{
if(n>temp.key[i])
break;
}
temp.length++;
for(j=temp.length;j> ......
fastshow()
{
FILE *fp;
char name[10];
char ch[512];
printf("ÇëÊäÈë´ýÏÔʾµÄÎļþÃû\n");
scanf("%s",name);
if((fp=fopen(name,"r"))==NULL)
{
printf("²»ÄÜ´ò¿ªÎļþ!\n");
exit(0);}
fgets(ch,10000,fp);
printf("%s",ch);
......
#include <string.h>
#include <stdio.h>
void main()
{
int i;
char buf[]="abcde";
strncpy(buf,"abc",3);
for(i=0;i <5;i++)
printf("%c",buf[i]);
printf("\n");
}
ÇëÎʳöʲôÎÊÌâÁË£¿
LIBCD.lib(wincrt0.obj) ......