Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

C/C++ÖÐtypedefµÄÓ÷¨£¬¸æËßÄã²»Ò»ÑùµÄtypedef


<!--
/* Font Definitions */
@font-face
{font-family:ËÎÌå;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"\@ËÎÌå";
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:ˎ̥;
panose-1:0 0 0 0 0 0 0 0 0 0;
mso-font-alt:"Times New Roman";
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-format:other;
mso-font-pitch:auto;
mso-font-signature:0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
mso-pagination:none;
font-size:10.5pt;
mso-bidi-font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:ËÎÌå;
mso-font-kerning:1.0pt;}
/* Page Definitions */
@page
{mso-page-border-surround-header:no;
mso-page-border-surround-footer:no;}
@page Section1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;
mso-header-margin:36.0pt;
mso-footer-margin:36.0pt;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
À´Ô´Ò»
:Using typedef to Curb Miscreant Code
Typedef
ÉùÃ÷ÓÐÖúÓÚ´´½¨Æ½Ì¨ÎÞ¹ØÀàÐÍ£¬ÉõÖÁÄÜÒþ²Ø¸´ÔÓºÍÄÑÒÔÀí½âµÄÓï·¨¡£²»¹ÜÔõÑù£¬Ê¹ÓÃ
typedef
ÄÜΪ´úÂë´øÀ´ÒâÏë²»µ½µÄºÃ´¦£¬Í¨¹ý±¾ÎÄÄã¿ÉÒÔѧϰÓÃ
typedef
±ÜÃâȱǷ£¬´Ó¶øʹ´úÂë¸ü½¡×³¡£
typedef
ÉùÃ÷£¬¼ò³Æ
typedef
£¬ÎªÏÖÓÐÀàÐÍ´´½¨Ò»¸öеÄÃû×Ö¡£±ÈÈçÈËÃdz£³£Ê¹ÓÃ
typedef
À´±àд¸üÃÀ¹ÛºÍ¿É¶ÁµÄ´úÂë¡£ËùνÃÀ¹Û£¬ÒâÖ¸
typedef
ÄÜÒþ²Ø±¿×¾µÄÓï·¨¹¹ÔìÒÔ¼°Æ½Ì¨Ïà¹ØµÄÊý¾ÝÀàÐÍ£¬´Ó¶øÔöÇ¿¿ÉÒÆÖ²ÐÔºÍÒÔ¼°Î´À´µÄ¿Éά»¤ÐÔ¡£±¾ÎÄÏÂÃ潫½ß¾¡È«Á¦À´½Òʾ
typedef
Ç¿´ó¹¦ÄÜÒÔ¼°ÈçºÎ±ÜÃâһЩ³£¼ûµÄÏÝÚå¡£
ÈçºÎ´´½¨Æ½Ì¨Î޹صÄÊý¾ÝÀàÐÍ£¬Òþ²Ø±¿×¾ÇÒÄÑÒÔÀí½âµÄÓï·¨


Ïà¹ØÎĵµ£º

×îСÉú³ÉÊ÷µÄKruskalËã·¨(C/C++) ¸½ÓвâÊÔÊý¾ÝºÍ½á¹û

/*
*Ëã·¨Ô­Àí£º½«Í¼G Öеı߰´È¨Êý´ÓСµ½´óÖðÌõ¿¼²ì,
* °´²»¹¹³ÉȦµÄÔ­Ôò¼ÓÈëµ½TÖÐ(ÈôÓÐÑ¡Ôñʱ, ²»Í¬µÄÑ¡
* Ôñ¿ÉÄܻᵼÖÂ×îºóÉú³ÉÊ÷µÄȨÊý²»Í¬), Ö±µ½
* q(T) = p(G)-1Ϊֹ, ¼´ T µÄ±ßÊý = G µÄ¶¥µã1 Ϊֹ.
*Ëã·¨ÖÐÎÞȦÐÔµÄÅж¨±È½ÏÂé·³£¬Ó¦¸ÃÓñê¼Ç·¨×îºÃ£¬
*¶Ô¸÷¸ö·ÖÖ§µÄ¶¥µã±êºÅ¡£
*ÎÒû×Ðϸ¿ ......

c²Ù×÷·­×ª×Ö·û´®


#include<stdio.h>
#include<malloc.h>
#include<string.h>
/*
* ·­×ª
*/
char *mystrrev(char *arr)
{
if (!arr)
{
return NULL;
}
char *temp = arr;
char t;
int leng = strlen(arr) + 1;
int l = (int)(leng / 2);
int i = 0;
while (l--)
{
t = arr[i];
arr[ ......

C/C++ÃæÊÔÌâÁù£¨¾­µä) ¡¾×ª¡¿

1.ÇóÏÂÃ溯ÊýµÄ·µ»ØÖµ£¨Î¢Èí£©
int func(x)
{
    int countx = 0;
    while(x)
    {
          countx ++;
          x = x&(x-1);
     } ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ