²âÊÔ¶ÔCµÄÕÆÎճ̶È
ÏÂÃæÕâ¸ö³ÌÐòÊä³öʲô£¿
enum {false,true};
int main()
{
int i=1;
do
{
printf("%d\n",i);
i++;
if(i < 15)
continue;
}while(false);
return 0;
}
ÄãÏàÐÅô£¿ÏÂÃæÕâ¸ö³ÌÐòÊä³öµÄÁ½Ðж«Î÷²»Ò»Ñù£¡
#include
#define f(a,b) a##b
#define g(a) #a
#define h(a) g(a)
int main()
{
printf("%s\n",h(f(1,2)));
printf("%s\n",g(f(1,2)));
return 0;
}
ÏÂÃæµÄ³ÌÐò¿´ËÆÍêÈ«ÕýÈ·¡£ÄãÄÜ¿´³öËüΪʲôͨ²»¹ý±àÒëÂð£¿
¿´³öÎÊÌâÇ°²»ÒªÈ¥ÊÔ×űàÒ룬²»È»Äã»áºó»ÚÄãû¿´³öÀ´Õâ¸öµÍ¼¶µÄÓï·¨´íÎó¡£
#include
void OS_Solaris_print()
{
printf("Solaris - Sun Microsystems\n");
}
void OS_Windows_print()
{
printf("Windows - Microsoft\n");
}
void OS_HP-UX_print()
{
printf("HP-UX - Hewlett Packard\n");
}
int main()
{
int num;
printf("Enter the number (1-3):\n");
scanf("%d",&num);
switch(num)
{
case 1:
OS_Solaris_print();
break;
case 2:
OS_Windows_print();
break;
case 3:
OS_HP-UX_print();
break;
default:
printf("Hmm! only 1-3 :-)\n");
break;
}
return 0;
}
ΪʲôÏÂÃæÕâ¸ö³ÌÐòµÄÊä³ö²»ÊÇNONE£¿¿´Äã¶à¾Ã²ÅÄÜ¿´³öÀ´¡£
#include
int main()
{
int a=10;
switch(a)
{
case '1':
printf("ONE\n");
break;
case '2':
printf("TWO\n");
break;
defa1ut:
printf("NONE\n&quo
Ïà¹ØÎĵµ£º
×òÌì²Å¿´µ½£¬µ«ÊÇÓöµ½Ò»Ð©ÎÊÌ⣬½ñÌì½â¾öÁË£¬¼ÇÏ¡¡£¨²Î¿¼£ºhttp://netbeans.org/kb/55/beginning-jni-part1.html£©
ÎÒÓõÄÊÇNetbeans 6.7£¬µ«ÊǺÍÆäËûµÄÒ²Ó¦¸Ã´óͬСÒì°É¡£ »ù±¾Á÷³Ì£º JavaÕâ±ßµÄ£º
´´½¨javaÎļþ£¨´ønativeµÄ£©£¬»¹Òª¼ÇµÃÔÚÀàÖмÓÈ룺System.loadLibrary(xxx) ¡£
È»ºóÓÃjavahÀ´Éú³ÉC/ ......
ÊÔÌâ1£ºÇëдһ¸öCº¯Êý£¬Èô´¦ÀíÆ÷ÊÇBig_endianµÄ£¬Ôò·µ»Ø0£»ÈôÊÇLittle_endianµÄ£¬Ôò·µ»Ø1
½â´ð£º
int checkCPU( )
{
{
union w
{
&n ......
ͻ񻣼
Îĵµ×«Ð´ÊÇÒ»ÏîÊ®·Ö·±Ëö¶øÇÒ·ÑÁ¦µÄ¹¤×÷£¬ÏàÐÅÒѾÓкܶàÈ˶ԴËÉî¸ÐÍ·Í´¡£ÎĵµÉú³É¹¤¾ßµÄ³öÏÖ×î´óÏ޶ȵذïÖú³ÌÐòÔ±½â¾öÁËÕâ¸öÎÊÌ⣬ÕâЩ¹¤¾ßͨ³£¿ÉÒÔ´Ó³ÌÐòÔ´´úÂë×Ô¶¯Éú³ÉÎĵµ£¬´ó´ó·½±ãÁËÎĵµ¹¤×÷¡£ÕâƪС¶«Î÷Ö÷Òª½éÉÜÁËÈçºÎÓÃVIMºÍdoxygenÀ´¿ìËÙÉú³É×¢ÊÍ£¬²¢ÓÃ×îÉٵĶîÍâÀͶ¯À´Íê³Éרҵˮ׼µÄ³ÌÐòÎĵµµÄ¹ý³Ì¡£½ö¹© ......
2009-07-26 15:50
½ñÌìÇÞÊÒµÄɽ¶«ÐÖµÜÔÚÁ·¶þ¼¶µÄÉÏ»ú£¬ÆäÖÐÒ»¸öÌâÄ¿´ó¸ÅÊÇÕâÑù£ºÔÚÒ»¸öº¯ÊýÖУ¬ÓÐÒ»¸öÖ¸ÕëÐβΣ¬¼ÇΪ*p£¬È»ºóÔÚº¯ÊýÄÚ²¿¶¨ÒåÁËÁÙʱ±äÁ¿a,aºÍ*pÊÇͬÖÖÀàÐÍ¡£¾¹ýһϵÁмÆËã £¬aµÃµ½ÁËÒ»¸öÖµ£¬Õâ¸öÖµ×îºóÊÇÐèÒª¼Ç¼ÔÚÖ¸Õë*pÀïÃæµÄ£¬Ó¦¸ÃÔõô±£´æÄØ£¿ÎÒµ±Ê±Ëæ±ã¾Í˵£¬p=&a¡£½á¹û·¢Éú´íÎóÁË£¬Ã»Óе ......