Cº¯Êý¿â½éÉÜ: string.h¡¢mem.h
²Ù×÷º¯Êý,ËùÔÚº¯Êý¿âΪstring.h¡¢mem.h
mem…²Ù×÷´æÖüÊý×é
void *memccpy(void *destin,void *source,unsigned char ch,unsigned n)
void *memchr(void *s,char ch,unsigned n)
void *memcmp(void *s1,void *s2,unsigned n)
int memicmp(void *s1,void *s2,unsigned n)
void *memmove(void *destin,void *source,unsigned n)
void *memcpy(void *destin,void *source,unsigned n)
void *memset(void *s,char ch,unsigned n)
ÕâЩº¯Êý,mem…ϵÁеÄËùÓгÉÔ±¾ù²Ù×÷´æÖüÊý×é.ÔÚËùÓÐÕâЩº¯ÊýÖÐ,Êý×éÊÇn×Ö½Ú³¤.
memcpy´Ósource¸´ÖÆÒ»¸ön×ֽڵĿ鵽destin.Èç¹ûÔ´¿éºÍÄ¿±ê¿éÖصü,ÔòÑ¡Ôñ¸´ÖÆ·½Ïò,
ÒÔÀýÕýÈ·µØ¸´ÖƸ²¸ÇµÄ×Ö½Ú.
memmoveÓëmemcpyÏàͬ.
memset½«sµÄËùÓÐ×Ö½ÚÖÃÓÚ×Ö½ÚchÖÐ.sÊý×éµÄ³¤¶ÈÓÉn¸ø³ö.
memcmp±È½ÏÕýºÃÊÇn×Ö½Ú³¤µÄÁ½¸ö×Ö·û´®s1ºÍs2.Щº¯Êý°´ÎÞ·ûºÅ×Ö·û±È½Ï×Ö½Ú,Òò´Ë,
memcmp("0xFF","\x7F",1)·µ»ØÖµ´óÓÚ0.
memicmp±È½Ïs1ºÍs2µÄÇ°n¸ö×Ö½Ú,²»¹Ü×Ö·û´óд»òСд.
memccpy´Ósource¸´ÖÆ×Ö½Úµ½destin.¸´ÖÆÒ»½áÊø¾Í·¢ÉúÏÂÁÐÈÎÒ»Çé¿ö:
(1)×Ö·ûchÊ×Ñ¡¸´ÖƵ½destin.
(2)n¸ö×Ö½ÚÒѸ´ÖƵ½destin.
memchr¶Ô×Ö·ûch¼ìË÷sÊý×éµÄÇ°n¸ö×Ö½Ú.
·µ»ØÖµ:memmoveºÍmemcpy·µ»Ødestin
memset·µ»ØsµÄÖµ
memcmpºÍmemicmp©¤©Ð©¤Èôs1<s2·µ»ØֵСÓÚ0
©À©¤Èôs1=s2·µ»ØÖµµÈÓÚ0
©¸©¤Èôs1>s2·µ»ØÖµ´óÓÚ0
memccpyÈô¸´ÖÆÁËch,Ôò·µ»ØÖ±½Ó¸úËæchµÄÔÚdestinÖеÄ×Ö½ÚµÄÒ»¸öÖ¸Õë;
·ñÔò·µ»ØNULL
memchr·µ»ØÔÚsÖÐÊ×ÏȳöÏÖchµÄÒ»¸öÖ¸Õë;Èç¹ûÔÚsÊý×éÖв»³öÏÖch,¾Í·µ»ØNULL.
void movedata(int segsrc,int offsrc,
int segdest,int offdest,
&nb
Ïà¹ØÎĵµ£º
Ò»¡¢¿ª·¢»·¾³
1¡¢ windowsXP
2¡¢ mysql 5.0.22
3¡¢ Dev-C++ 4.9.9.2
4¡¢ ÏÂÔØ(mysqlpp-2.3.2-gcc3.4.2-1due.DevPak)
5¡¢ MySQL.DevPak ÏÂÔصØÖ·£º http://downloads.sourceforge.net/dev-cpp/MySQL.DevPak
6¡¢ ÏÂÔØÒÔºóͨ¹ý‘¹¤¾ß[T]’ --> ´ò ......
(ת)C/C++ÖеÄÈÕÆÚºÍʱ¼ä time_tÓëstruct tmת»»
ͻ񻣼
±¾ÎÄ´Ó½éÉÜ»ù´¡¸ÅÄîÈëÊÖ£¬Ì½ÌÖÁËÔÚC/C++ÖжÔÈÕÆÚºÍʱ¼ä²Ù×÷ËùÓõ½µÄÊý¾Ý½á¹¹ºÍº¯Êý£¬²¢¶Ô¼Æʱ¡¢Ê±¼äµÄ»ñÈ¡¡¢Ê±¼äµÄ¼ÆËãºÍÏÔʾ¸ñʽµÈ·½Ãæ½øÐÐÁ˲ûÊö¡£±¾ÎÄ»¹Í¨¹ý´óÁ¿µÄʵÀýÏòÄãչʾÁËtime.hÍ·ÎļþÖÐÉùÃ÷µÄ¸÷ÖÖº¯ÊýºÍÊý¾Ý½á¹¹µÄÏêϸʹÓ÷½·¨¡£
¹Ø¼ü×Ö£ºUTC£¨ÊÀ½ç±ê ......
ÈçºÎ½»»»Á½¸ö±äÁ¿µÄÖµ£º
CÓïÑÔÖеĴ«Öµ´úÂëÈçÏ£º
int change(int x,int y)
{
int temp=x;
x=y;
y=temp;
}
CÓïÑÔÖеĴ«Ö·´úÂëÈçÏ£º
int change(int *p,int *q)
{
int temp=*p;
*p=*q;
*q=temp;
}
ʹÓÃC++ÖеÄÒýÓÃÀàÐÍ´úÂëÈçÏÂ:
int change(int &x,int &y)
{
int temp=x;
x=y;
y=temp;
}
JAV ......
¡¡¡¡¶ÔÓÚÒ»¸öc/c++³ÌÐòÔ±À´Ëµ£¬ÄÚ´æй©ÊÇÒ»¸ö³£¼ûµÄÒ²ÊÇÁîÈËÍ·ÌÛµÄÎÊÌâ¡£ÒѾÓÐÐí¶à¼¼Êõ±»Ñо¿³öÀ´ÒÔÓ¦¶ÔÕâ¸öÎÊÌ⣬±ÈÈçSmart Pointer£¬Garbage CollectionµÈ¡£Smart Pointer¼¼Êõ±È½Ï³ÉÊ죬STLÖÐÒѾ°üº¬Ö§³ÖSmart PointerµÄclass£¬µ«ÊÇËüµÄʹÓÃËƺõ²¢²»¹ã·º£¬¶øÇÒËüÒ²²»Äܽâ¾öËùÓеÄÎÊÌ⣻Garbage Collection¼¼ÊõÔÚJavaÖÐ ......
»Ø¹Ë֮ǰµÄƪ·ù£¬CÓïÑÔµÄÖ÷Ì岿·Ö»ù±¾ÒѾ½éÉÜÍêÁË¡£Ö®ËùÒÔûÓнéÉÜC++µÄÏà¹ØÌØÐÔÊÇÒòΪÔÚ֮ǰµÄÎÄÕÂÖÐCºÍC++ÔÚÕâЩ·½Ã涼Óй²ÐÔ£¬ËùÒÔÔÚÃæÏò¶ÔÏó֮ǰ¡£ÎÒÃÇÏÈ°ÑÕâЩ¹²ÐÔ¸ø½éÉÜÍê¡£Ò²¾ÍÊÇ˵ÔÚ½éÉÜÃæÏò¶ÔÏó֮ǰ£¬ËùÓеÄÎÄÕ¶¼ÊÇCC++Öж¼ÄÜʹÓõġ£´ÓÕâµãÉÏÀ´¿´£¬ÏÖÔÚÕý¼«Á¦·Ü¶·ÓÚC++Õ½ÏßÉϵijõѧÕß»¹ÊǺÜÓÐÓô¦µÄ¡£
±¾Æª¼ ......