Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB
ÈÈÃűêÇ©£º c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 ×îÐÂÎÄÕ : c

CÒÅÁôµÄ½á¹¹Ìøת ±±º£

1)          goto
goto Ö»ÄÜÔÚÒ»¸öº¯ÊýÄÚÌøת¡£½¨ÒéÉÙÓã¬Ê¹µÃ³ÌÐòά»¤ÆðÀ´ÈÝÒ׳ö´í£»µ«ÊÇ£¬ÔÚÓжà¸öÑ­»·Çé¿öÏÂÌøת£¬ÓÐʱÓÃgoto¿ÉÒÔʹµÃÎÊÌâ±äµÃ¼òµ¥¡£
class A
{
public:
A(){}
~A(){}
};
              int main()
{
{
              A a;
              goto Label1;
}
Label1:
cout<<”end”<<endl;
return 0;
}    
 
2)          setjmp/longjmp
·Ç¾Ö²¿ÓòÌøת(nonlocal goto)£¬¿ÉÓÃÓÚÔÚ²»Í¬º¯ÊýÄÚÌøת£¬²½ÖèÈçÏ£º
l         include <setjmp.h>
l         jmp_buf JumpBuffer
//ÌøתµÄλÖýṹ
l         setjmp(JumpBuffer)
±£´æµ±Ç°µÄλÖ㬽«À´ ......

CÖ¸ÕëÖ®ÃÀÒ»£ºÉñÆæµÄº¯Êý

void mystery(int n)
{
 n += 5;
 n /= 10;
 printf(" :%s\n","***********" + 10 -n);
}
µ±Ò»¸ö×Ö·û´®³£Á¿Î»ÓÚÒ»¸ö±í´ïʽÖÐʱ£¬ËüµÄÖµÊÇÒ»¸öÖ¸Õë³£Á¿¡£±àÒëÆ÷°ÑÕâЩָ¶¨×Ö·ûµÄÒ»·Ý¿½±´´æ´¢ÔÚÄÚ´æµÄij¸öλÖ㬲¢´æ´¢Ò»¸öÖ¸ÏòµÚ1¸ö×Ö·ûµÄÖ¸Õë¡£µ«ÊÇ£¬µ±Êý×éÃûÓÃÓÚ±í´ïʽÖÐʱ£¬ËûÃǵÄÖµÒ²ÊÇÒ»¸öÖ¸Õë³£Á¿¡£ÎÒÃÇ¿ÉÒÔ¶ÔËûÃǽøÐÐϱêÒýÓᢼä½Ó·ÃÎÊÒÔ¼°Ö¸ÕëÔËËã¡£
exaple 1£º
“xyz” + 1
±í´ïʽµÄÖµÊÇÖ¸Ïòy×Ö·ûµÄÖ¸Õë¡£ ......

C' Fragment

°ÑÊäÈëµÄÒ»´®×Ö·ûת³ÉÊý×飬ת³ÉÁ´±í£¬È»ºóɾȥÆäÖÐÖ¸¶¨µÄ×Ö·û£¬ÔÚβ²¿Ìí¼ÓÒ»¸ö×Ö·û¡£
£¨³ÌÐò»¹²»ÍêÉÆ£¬Ã»ÓжÔÊä´íµÄÇé¿ö½øÐд¦Àí£¬£¬ÔÝʱÏÈÕâÑù°É¡£¡£= =¡££©
#include<stdio.h>
#include<malloc.h>
#define LEN sizeof(struct link)
struct link
{
char ch;
struct link *next;
}*string;
char a[80]={0};
void array()
{
scanf("%s",a);
}
void creat(char *a)
{
int i;
struct link *head,*p;
p=head=(struct link *)malloc(LEN);
for(i=0;i<80;i++)
{
if(*(a+i)!=0)
{
p->ch=*(a+i);
p->next=(struct link *)malloc(LEN);
p=p->next;
}
else
{
p->ch=0;
p->next=NULL;
break;
}
}
string=head;
}
void print(struct link *head)
{
struct link *p;
p=head;
while(p->next!=NULL)
{
printf("%c ",p->ch);
p=p->next;
}
printf("\n");
}
void del(struct link *head)
{
char a[1]={0};
struct link *p1,*p2;
p1=head;
printf("input the char you delete:");
scanf(" ......

C/C++Í·ÎļþÒ»ÀÀ


C/C++
Í·ÎļþÒ»ÀÀ

//////////////////////////////////////////////////////////////////////////
C
Í·Îļþ
(C89,C95)
(C++98,C++03Ò²°üº¬)
include <assert.h>¡¡¡¡¡¡¡¡//Õï¶Ï¿â
include <ctype.h>¡¡¡¡¡¡¡¡ //×Ö·û´¦Àíº¯Êý¿â
include <errno.h>¡¡¡¡¡¡¡¡ //´íÎó¶¨Òå
include <float.h>¡¡¡¡¡¡¡¡ //¸¡µãÊý´¦Àí
include <iso646.h>        //¶ÔÓ¦¸÷ÖÖÔËËã·ûµÄºê
include <limits.h>¡¡¡¡¡¡¡¡//¶¨Òå¸÷ÖÖÊý¾ÝÀàÐÍ×îÖµµÄ³£Á¿
include <locale.h>¡¡¡¡¡¡¡¡//¶¨Òå±¾µØ»¯Cº¯Êý
include <math.h>¡¡¡¡¡¡¡¡¡¡//¶¨ÒåÊýѧº¯Êý
include <setjmp.h>        //Òì³£´¦ÀíÖ§³Ö
include <signal.h>        //ÐźŻúÖÆÖ§³Ö
include <stdarg.h>        //¿É±ä²ÎÊýÁбíÖ§³Ö
include <stddef.h>        //³£Óó£Á¿
include <stdio.h>¡¡¡¡¡¡¡¡ //¶¨ÒåÊäÈ룯Êä³öº¯Êý
include <stdlib.h>¡¡¡¡¡¡¡¡//¶¨Òå ......

C/C++Í·ÎļþÒ»ÀÀ


C/C++
Í·ÎļþÒ»ÀÀ

//////////////////////////////////////////////////////////////////////////
C
Í·Îļþ
(C89,C95)
(C++98,C++03Ò²°üº¬)
include <assert.h>¡¡¡¡¡¡¡¡//Õï¶Ï¿â
include <ctype.h>¡¡¡¡¡¡¡¡ //×Ö·û´¦Àíº¯Êý¿â
include <errno.h>¡¡¡¡¡¡¡¡ //´íÎó¶¨Òå
include <float.h>¡¡¡¡¡¡¡¡ //¸¡µãÊý´¦Àí
include <iso646.h>        //¶ÔÓ¦¸÷ÖÖÔËËã·ûµÄºê
include <limits.h>¡¡¡¡¡¡¡¡//¶¨Òå¸÷ÖÖÊý¾ÝÀàÐÍ×îÖµµÄ³£Á¿
include <locale.h>¡¡¡¡¡¡¡¡//¶¨Òå±¾µØ»¯Cº¯Êý
include <math.h>¡¡¡¡¡¡¡¡¡¡//¶¨ÒåÊýѧº¯Êý
include <setjmp.h>        //Òì³£´¦ÀíÖ§³Ö
include <signal.h>        //ÐźŻúÖÆÖ§³Ö
include <stdarg.h>        //¿É±ä²ÎÊýÁбíÖ§³Ö
include <stddef.h>        //³£Óó£Á¿
include <stdio.h>¡¡¡¡¡¡¡¡ //¶¨ÒåÊäÈ룯Êä³öº¯Êý
include <stdlib.h>¡¡¡¡¡¡¡¡//¶¨Òå ......

linux³£ÓÃcÍ·Îļþ

linux³£ÓÃÍ·ÎļþÈçÏ£º
POSIX±ê×¼¶¨ÒåµÄÍ·Îļþ
<dirent.h>       
Ŀ¼Ïî
<fcntl.h>         Îļþ¿ØÖÆ
<fnmatch.h>    ÎļþÃûÆ¥ÅäÀàÐÍ
<glob.h>   
·¾¶ÃûģʽƥÅäÀàÐÍ
<grp.h>        ×éÎļþ
<netdb.h>    ÍøÂçÊý¾Ý¿â²Ù×÷
<pwd.h>       
¿ÚÁîÎļþ
<regex.h>    ÕýÔò±í´ïʽ
<tar.h>        TAR¹éµµÖµ
<termios.h>   
ÖÕ¶ËI/O
<unistd.h>    ·ûºÅ³£Á¿
<utime.h>    Îļþʱ¼ä
<wordexp.h>   
×Ö·ûÀ©Õ¹ÀàÐÍ
-------------------------
<arpa/inet.h>   
INTERNET¶¨Òå
<net/if.h>    Ì×½Ó×Ö±¾µØ½Ó¿Ú
<netinet/in.h>   
INTERNETµØÖ·×å
<netinet/tcp.h>   ......

linux³£ÓÃcÍ·Îļþ

linux³£ÓÃÍ·ÎļþÈçÏ£º
POSIX±ê×¼¶¨ÒåµÄÍ·Îļþ
<dirent.h>       
Ŀ¼Ïî
<fcntl.h>         Îļþ¿ØÖÆ
<fnmatch.h>    ÎļþÃûÆ¥ÅäÀàÐÍ
<glob.h>   
·¾¶ÃûģʽƥÅäÀàÐÍ
<grp.h>        ×éÎļþ
<netdb.h>    ÍøÂçÊý¾Ý¿â²Ù×÷
<pwd.h>       
¿ÚÁîÎļþ
<regex.h>    ÕýÔò±í´ïʽ
<tar.h>        TAR¹éµµÖµ
<termios.h>   
ÖÕ¶ËI/O
<unistd.h>    ·ûºÅ³£Á¿
<utime.h>    Îļþʱ¼ä
<wordexp.h>   
×Ö·ûÀ©Õ¹ÀàÐÍ
-------------------------
<arpa/inet.h>   
INTERNET¶¨Òå
<net/if.h>    Ì×½Ó×Ö±¾µØ½Ó¿Ú
<netinet/in.h>   
INTERNETµØÖ·×å
<netinet/tcp.h>   ......

c ÓïÑÔÏÝÚå

Ô­Öø£ºAndrew Koenig - AT&T Bell Laboratories Murray Hill, New Jersey 07094
·­Ò룺lover_P
0 ¼ò½é
    CÓïÑÔ¼°ÆäµäÐÍʵÏÖ±»Éè¼ÆΪÄܱ»×¨¼ÒÃÇÈÝÒ×µØʹÓá£ÕâÃÅÓïÑÔ¼ò½à²¢¸½Óбí´ïÁ¦¡£µ«ÓÐһЩÏÞÖÆ¿ÉÒÔ±£»¤ÄÇЩ¸¡ÔêµÄÈË¡£Ò»¸ö¸¡ÔêµÄÈË¿ÉÒÔ´ÓÕâЩÌõ¿îÖлñµÃһЩ°ïÖú¡£
    ÔÚ±¾ÎÄÖУ¬ÎÒÃǽ«»á¿´Ò»¿´ÕâЩδ¿ÉÖªµÄÒæ´¦¡£ÕâÊÇÓÉÓÚËüµÄδ¿ÉÖª£¬ÎÒÃÇÎÞ·¨ÎªÆä½øÐÐÍêÈ«µÄ·ÖÀà¡£²»¹ý£¬ÎÒÃÇÈÔȻͨ¹ýÑо¿ÎªÁËÒ»¸öC³ÌÐòµÄÔËÐÐËùÐèÒª×öµÄÊÂÀ´×öµ½ÕâЩ¡£ÎÒÃǼÙÉè¶ÁÕ߶ÔCÓïÑÔÖÁÉÙÓиö´ÖdzµÄÁ˽⡣
    µÚÒ»²¿·ÖÑо¿Á˵±³ÌÐò±»»®·ÖΪ¼ÇºÅʱ»á·¢ÉúµÄÎÊÌâ¡£µÚ¶þ²¿·Ö¼ÌÐøÑо¿Á˵±³ÌÐòµÄ¼ÇºÅ±»±àÒëÆ÷×éºÏΪÉùÃ÷¡¢±í´ïʽºÍÓï¾äʱ»á³öÏÖµÄÎÊÌâ¡£µÚÈý²¿·ÖÑо¿ÁËÓɶà¸ö²¿·Ö×é³É¡¢·Ö±ð±àÒë²¢°ó¶¨µ½Ò»ÆðµÄC³ÌÐò¡£µÚËIJ¿·Ö´¦ÀíÁ˸ÅÄîÉϵÄÎó½â£ºµ±Ò»¸ö³ÌÐò¾ßÌåÖ´ÐÐʱ»á·¢ÉúµÄÊÂÇé¡£µÚÎ岿·ÖÑо¿ÁËÎÒÃǵijÌÐòºÍËüÃÇËùʹÓõij£ÓÿâÖ®¼äµÄ¹Øϵ¡£ÔÚµÚÁù²¿·ÖÖУ¬ÎÒÃÇ×¢Òâµ½ÁËÎÒÃÇËùдµÄ³ÌÐòÒ²²»²¢²»ÊÇÎÒÃÇËùÔËÐеijÌÐò£»Ô¤´¦ÀíÆ÷½«Ê×ÏÈÔËÐС£×îºó£¬µÚÆß²¿·ÖÌÖÂÛÁË¿ÉÒÆÖ²ÐÔÎÊÌ⣺һ¸öÄÜÔÚÒ»¸öʵÏÖÖÐÔËÐеijÌÐòÎÞ·¨ÔÚÁíÒ»¸öʵÏÖÖÐÔËÐеÄÔ ......
×ܼǼÊý:2015; ×ÜÒ³Êý:336; ÿҳ6 Ìõ; Ê×Ò³ ÉÏÒ»Ò³ [1] 2 [3] [4] [5] [6] [7] [8] [9] [10]  ÏÂÒ»Ò³ βҳ
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ