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

c/c++ÀàÐÍ

1.·ÖÀà
 ÄÚ²¿ÀàÐÍ ºÍÓû§¶¨ÒåÀàÐÍ
2.
 ÕûÐΣºbool ,×Ö·ûÐÍ£¬ÕûÐÎ
   true  1                   flase 0
   ·ÇÁã true                Áã  flase
   ·Ç¿ÕÖ¸Õë true          ¿ÕÖ¸Õë flase
char ,wchar_t
(unsigned  signed)
int   short int  long int   (unsigned signed)
 3.
enum ÀàÐÍ (enum Êǹؼü×Ö £¬Èçͬ class )
  enum {}
  enum flag{a=1,b=100};
  flag f1=flag(101);//ÏÔʾת»»ÎªÃ¶¾Ù
ö¾Ù·ûµÄ·¶Î§ ¡¾0--2^k-1¡¿
                    ¡¾-2^k--2^k-1¡¿
  sizeof (flag)==sizeof(int)==sizeof(bool);
  ö¾ÙÀàÐÍ¿ÉÒÔת»»Îª ÕûÐÎ
  3.ÉùÃ÷ ºÍ¶¨ÒåµÄÇø±ð
  extern int error_code;
  int get_age();
  int error_code=3;
 int get_age£¨£©
{
}
ÃèÊö·û »ù´¡ÀàÐÍ ÉùÃ÷·ûºÅ ³õʼʽ
ÉùÃ÷·û=Ãû×Ö+ÉùÃ÷ÔËËã·û
*
[]
()
&
* const
4.×÷ÓÃÓò
º¯Êý£¬À࣬Ãû×ֿռ䣬ȫ¾Ö
È«¾Ö ¾Ö²¿¾²Ì¬ Ãû×Ö¿Õ¼ä ÒÔ0 ³õʼ»¯
¾Ö²¿±äÁ¿ ¶Ñ±äÁ¿
¾²Ì¬¶ÔÏó£ºÈ«¾Ö ¾Ö²¿¾²Ì¬ Ãû×Ö¿Õ¼ä
×Ô¶¯¶ÔÏ󣺾ֲ¿±äÁ¿
Ö±½Ó¿ØÖƶÔÏ󣺶ÑÉϵıäÁ¿
5.×óÖµ
int a=3;
&a ÊǸöÓÒÖµ
int &b=a//ÒýÓÃÒ»¸ö×óÖµ
const int &c=a//
const int &d=4;//const ÒýÓà ¿ÉÒÔÊǸöÓÒÖµ
const int * a1=0;
 int const * const &  b=&a1;
const int*
int*
const int &


Ïà¹ØÎĵµ£º

c ÓïÑÔÖдøconst µÄÖ¸ÕëС¼Ç

Ò»¡¢ÓÐÈçÏ´úÂ룺
int age = 25;
const int *pAge = &age;

ÉÏÃæµÄ´úÂë±íʾ£º
1¡¢Ö¸Õë±äÁ¿pAge´æ·Å±äÁ¿ageµÄµØÖ·£¬ÇÒ²»ÄÜͨ¹ý *pAge = 30£¬À´¸Ä±äÖ¸Õë±äÁ¿pAgeËùÖ¸ÏòµÄ´æ´¢¿Õ¼äµÄÖµ£¬µ«ÊÇ ¶ÔÓÚ age = 30£¬ÔòÊÇûÓÐÎÊÌâµÄ¡£
2¡¢pAge ±¾Éí¿ÉÒÔÔÙ´æ·ÅÆäËü±äÁ¿µÄµØÖ·£¬Ò²¿ÉÒÔÖ¸ÏòNULL£¬Èç pAge = NULL;ÊÇÕýÈ·µÄ¡£
¶ ......

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:"\@ËÎÌå" ......

C³ÌÐòʹÓò»Í¬º¯Êýµ÷ÓÃÔ¼¶¨µ÷Óûã±à×Ó¹ý³Ì

Èç×ªÔØ£¬Çë×¢Ã÷³ö´¦£ºhttp://blog.csdn.net/zhangyang0402/archive/2010/05/01/5549266.aspx
 
¿ª·¢¹¤¾ß£ºVC ++ 6.0  MASM32
 
Ò»¡¢__cdeclµ÷Ó÷½Ê½
 
1£®  ÔÚVCÖÐн¨Win32 Console Application, TestASM
 
2£®  н¨test.c
#include<stdio.h>
extern void swap(int * ......

¡¾×ª¡¿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ºÅ