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

CºÍC++µÄ±ê×¼¿â

CºÍC++µÄ±ê×¼¿â
ĬÈÏ·ÖÀà   2008-02-28 14:28   ÔĶÁ3   ÆÀÂÛ0  
×ֺţº ´ó´ó  ÖÐÖР СС
http://blog.chinaunix.net/u/6776/showart_186792.html C/C++Éî²ã̽Ë÷
    ±¾Ð¡½ÚÎÒÃǸÅÀÀÒ»ÏÂC/C++±ê×¼¿âµÄȫò¡£
    C/C++±ê×¼¿âµÄÄÚÈÝÖ÷Òª°üÀ¨£º
    ºê¶¨Òå £¨Æ©È磺 #define FLT_RADIX 2£©
    ÀàÐͶ¨Òå £¨Æ©È磺 typedef unsigned wchar _t£©
    ±äÁ¿ÉùÃ÷ºÍ¶¨Òå £¨Æ©È磺 extern int errno;£©
    ¿âº¯ÊýÉùÃ÷ºÍ¶¨Òå £¨Æ©È磺 size_t strlen(const char *s);£©
    ÆäÖУ¬ºê¶¨Òå¡¢ÀàÐͶ¨Òå¡¢±äÁ¿ÉùÃ÷ºÍ¿âº¯ÊýµÄÉùÃ÷¶¼ÔÚ±ê׼ͷÎļþ½øÐÐÃèÊö£¬ËùÒÔ£¬±ê׼ͷÎļþʵ¼ÊÉÏÒѾ­¹´»­³öÕû¸ö±ê×¼¿âµÄÂÖÀª¡£
    ÏÖÔÚÎÒÃÇÀ´¿´¿´CÓïÑԵıê׼ͷÎļþ¡£
C90ÓÐÕâЩ£º
assert.h   ctype.h   errno.h   float.h
limits.h   locale.h   math.h   setjmp.h
signal.h   stdarg.h   stddef.h   stdio.h
stdlib.h   string.h   time.h
C95Ôö¼ÓÕ⼸¸ö£º
iso646.h   wchar.h   wctype.h
C99ÔÙÔö¼ÓÏÂÃæÕâЩ£º
complex.h   fenv.h   initypes.h   stdbool.h
stdint.h   tgmath.h
    ҪעÒâµÄÊÇ£¬¸ß°æ±¾µÄC±ê×¼²»Ò»¶¨Êǽö½öÔö¼ÓÁËеÄÍ·Îļþ£¬»¹¿ÉÄܶÔÔ­ÏȵͰ汾C±ê×¼µÄijЩͷÎļþ½øÐÐÁËÐ޸ĺÍÀ©³ä¡£
    ʹÓÃC±ê×¼¿âºÜ¼òµ¥£¬Ö»ÐèÒª°üº¬ÏàÓ¦µÃÍ·Îļþ¾Í¿ÉÒÔÁË£¬ÀýÈ磺
/*C´úÂë*/
#include<stdio.h>
int main()
{
       printf(“printf() again...boring!\n”);
}
    ¶ø¶ÔÓÚC++£¬Çé¿ö¾ÍÓе㸴ÔÓ¡£
    Ê×ÏÈ£¬C++µÄÉè¼ÆÕßÏ£ÍûC++ÄÜÔÚÏ൱´óµÄ³Ì¶ÈÉϼæÈÝC£¬ÖÁÉÙ£¬C++±àÒëÆ÷Ó¦¸Ã×î´óÏ޶ȵĽÓÊÜÒѾ­´æÔڵĴóÁ¿C´úÂë¡£ËùÒÔ£¬ÔÊÐíʹÓÃC±ê×¼¿â×ÔÈ»ÊÇ×·ÇóµÄÄ¿±êÖ®Ò»¡£µ«CÓïÑÔ²¢Ã»ÓÐÀ©Õ¹Ãû×ÖÕâ»ØÊ£¬Ò²¾ÍÊÇ˵£¬Èç¹ûÏëÖ±½ÓʹÓÃÒѾ­ÓÃC±àÒëÆ÷±àÒëºÃµÄC¿â£¨Ö÷ÒªÊÇÖ¸¿âº¯Êý£©£¬C++±àÒëÆ÷±ØÐëÖªµÀÄÄЩÊÇC¿âº¯Êý£¬´Ó¶ø²»¶ÔÆä½øÐÐÃû×ÖÀ©Õ¹¡£ÓÚÊÇ£¬Á´½ÓÐÞÊηûextern “C”±


Ïà¹ØÎĵµ£º

ÔÚÆÁÄ»ÉÏ»­Í¼µÄC££ÊµÏÖ´úÂë


DllImportËùÔÚµÄÃû×Ö¿Õ¼ä using System.Runtime.InteropServices;
[DllImport("User32.dll")]
        public extern static System.IntPtr GetDC(System.IntPtr hWnd);   
        private void button19_Click(obj ......

cÓïÑÔ»ù´¡£¨ÊÇʱºò²¹²¹cµÄ»ù´¡ÁË£©

¿´Êý¾Ý½á¹¹ñÍÕ»µÄʱºòдÁËÕâôһ¶Î´úÂë
#include<stdio.h>
#include<stdlib.h>
struct linkstack
{
int data;
struct linkstack *next;
};
int initstack(linkstack * S)
{
S = (linkstack *)malloc(sizeof(linkstack));
if(S == NULL) return 0;
S->next = NULL;
return 1;
}
int main(int ......

C/C++Éî²ã̽Ë÷

Ò»¡¢
1¡¢¹ØÓÚ×Ö½Ú˳Ðò£º»°ËµÔÚÌض¨µÄÓ²¼þƽ̨ÉÏ£¬¶à×Ö½ÚÊý¾ÝµÄ˳Ðò´æ·ÅÓÐÁ½ÖÖ·½Ê½£¨little-endian¡¢big-endian£©¡£Ç°ÕßµÄÊý¾ÝµÄµÍ×Ö½Ú
     ²¿·Ö´æ·ÅÔڵ͵ØÖ·Äڴ棬ºóÕßÇ¡ºÃÏà·´¡£PCÒ»°ãÊÇ»ùÓÚIA-32΢´¦ÀíÆ÷£¬ÊôÓÚlittle-endian¡£Ä³Ð©RISC¼Ü¹¹µÄCPU£¬ÀýÈçSPARC¡¢
    POWERPCµÈ£¬ÔòÊ ......

c/c++ ×óÖµ ÓÒÖµÌÖÂÛ

×óÖµÐÔ£¨lvalueness£©ÔÚC/C++ÖÐÊDZí´ïʽµÄÒ»¸öÖØÒªÊôÐÔ¡£Ö»ÓÐͨ¹ýÒ»¸ö×óÖµ±í´ïʽ²ÅÄÜÀ´ÒýÓü°¸ü¸ÄÒ»¸ö¶ÔÏó£¨object£©µÄÖµ¡££¨Ä³Ð©Çé¿öÏ£¬ÓÒÖµ±í´ïʽҲÄÜÒýÓã¨refer£©µ½Ä³Ò»¸ö¶ÔÏ󣬲¢ÇÒ¿ÉÄܼä½ÓÐ޸ĸöÔÏóµÄÖµ£¬ºóÊö£©¡£
    ºÎν¶ÔÏó£¿Èç¹ûûÓÐÃ÷ȷ˵Ã÷£¬ÕâÀï˵µÄ¶ÔÏ󣬺ÍÏÁÒåµÄÀà/¶ÔÏó£¨class/object£© ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ