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

C±ê×¼¿âÍ·Îļþ assert.h

 C±ê×¼¿âÍ·Îļþ assert.h
@º¯ÊýÃû³Æ:   assert
º¯ÊýÔ­ÐÍ:   void assert(int exp)
º¯Êý¹¦ÄÜ:   Õï¶ÏÀࣺ±í´ïʽ½á¹ûÕýÈ·ÐÔ²âÊÔ²¢¿Éʹ³ÌÐòÖÐÖ¹
º¯Êý·µ»Ø:  
²ÎÊý˵Ã÷:   ½«´íÎóÐÅÏ¢Êä³öµ½Á÷stderrÖУ¬Èç¹ûexpΪ0£¬ÔòÖÐÖ¹³ÌÐòÖ´ÐÐ.exp-±í´ïʽ
ËùÊôÎļþ:   <assert.h>
#include <stdio.h>
#include <assert.h>
void process_string(char *string)
{
  /* use assert to check argument */
  assert(string!=NULL);
  assert(*string!='\0');
  /* rest of code follows here */
}
int main()
{
  process_string("hello");
  process_string("");
  return 0;
}
±¾ÎÄÀ´×ÔCSDN²©¿Í£¬×ªÔØÇë±êÃ÷³ö´¦£ºhttp://blog.csdn.net/lixinlu2000/archive/2006/11/18/1394975.aspx


Ïà¹ØÎĵµ£º

c´úÂ룺µç»°ºÅÂëºÍ×Öĸת»»

ÕâÁ½Ìì¿´µ½ÓÐÈËÌÖÂ۵绰¼üÅÌÉϵÄ×Öĸ¡¢ºÅÂëºÍ×ÖĸµÄת»»£¬ÎÒÒ²Ëæ±ãдÁËÒ»¶Î
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#define MAX_LEN 15
char *tbl_itoa[] =
{
"0", // 0
"1", // 1
"ABC", // 2
"DEF", // 3
"GHI", // 4
"JKL", // 5
"MNO", ......

java£¬or c++/c Ñ¡Ôñ

Ò»Ö±¶¼¸Ðµ½ºÜÃÔ㣬¶ÔÓÚÓïÑÔµÄÑ¡Ôñ£¬ÒòΪ»¹ÊDzËÄñµÄÔ­Òò£¬ÎÞ·¨¿´Í¸ÀïÃæµÄÖÖÖÖ¹ØÏµ£¬Ò»Ö±ÔÚ¾À½áÆäÖС£Æäʵ×Ô¼ºÒ²Ã÷°×“´óµÀÖÁ¼ò”£¬µ«»¹Êǰ´ÄͲ»×¡¿ñÏëµÄ˼Ð÷£¬ÌرðÊǵ±´Ó¹«Ë¾³ö²î»ØÀ´Ö®ºó£¬¼¸Ì춼ûÓÐ×öʲôÊÂÇé¡£
¶ÔCÓÐÒ»ÖÖÆ«ºÃ£¬ËùÒÔÒ»Ö±ÔÚÐÄÀï¾ÍÓеãÅųâjava¡£ËäÈ»javaÖÐÒ²ÓкܶණÎ÷Ҫѧ£¬µ«ÊÇDZÒâʶÀïÃæ¶ÔÕ ......

CÉî¶È½âÆÊÎÊÌâ´úÂë·ÖÎö±Ê¼Ç1

#include <stdio.h>
int main()
{
int a[5]={1,2,3,4,5};
int *ptr1=(int*)(&a+1);
int *ptr2=(int*)((int)a+1);
printf("%p,%x,%p\n",(int)a,*(ptr2+1),ptr1);//(int*)(&a));
printf("%d\n",(int*)(&a-16));
printf("%d,%x\n",ptr1[-1] ......

C³£Óú¯Êý

¼ì²é¿Õ¸ñ×Ö·û
#include <ctype.h>
int isspace ( int c );
http://www.cplusplus.com/reference/clibrary/cctype/isspace/
Checks if parameter c is a white-space character.For the purpose of this function, standard white-space characters are:
' '
(0x20)
space (SPC)
'\t'
(0x09)
horizontal tab ......

C/C++Êý×éÃûÓëÖ¸ÕëÇø±ðÉîÈë̽Ë÷

 
ÒýÑÔ
¡¡¡¡Ö¸ÕëÊÇC/C++ÓïÑÔµÄÌØÉ«£¬¶øÊý×éÃûÓëÖ¸ÕëÓÐÌ«¶àµÄÏàËÆ£¬ÉõÖÁºÜ¶àʱºò£¬Êý×éÃû¿ÉÒÔ×÷ΪָÕëʹÓá£ÓÚÊǺõ£¬ºÜ¶à³ÌÐòÉè¼ÆÕ߾ͱ»¸ãºýÍ¿ÁË¡£¶øÐí¶àµÄ´óѧÀÏʦ£¬ËûÃÇÔÚCÓïÑԵĽÌѧ¹ý³ÌÖÐÒ²´íÎóµÃ¸øÑ§Éú½²½â£º"Êý×éÃû¾ÍÊÇÖ¸Õë"¡£ºÜÐÒÔË£¬ÎҵĴóѧÀÏʦ¾ÍÊÇÆäÖÐÖ®Ò»¡£Ê±ÖÁ½ñÈÕ£¬ÎÒÈÕ¸´Ò»ÈյؽøÐÐ×ÅC/C++Ï ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ