Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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 ÓïÑÔÖÐÇå¿ÕÊäÈ뻺³åÇø

CÓïÑÔÖÐÓм¸¸ö»ù±¾ÊäÈ뺯Êý£º
//»ñÈ¡×Ö·ûϵÁÐ
int fgetc(FILE *stream);
int getc(FILE *stream);
int getchar(void);
 
//»ñÈ¡ÐÐϵÁÐ
char *fgets(char * restrict s, int n, FILE * restrict stream);
char *gets(char *s);//¿ÉÄܵ¼ÖÂÒç³ö£¬ÓÃfgets´úÌæÖ®¡£
 
//¸ñʽ»¯ÊäÈëϵÁÐ
int fscanf(FILE * r ......

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

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

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

[ת]C\C++ÓïÑÔÈëÃÅƪϵÁÐ

ËäȻѧϰÁ˺öàÄê,µ«ÐèҪϸ¾¿Ä³Ð©»ù´¡ÖªÊ¶µÄʱºò»¹ÊÇ·¢ÏÖ×Ô¼ºÍüÁË, ´Ó±ðÈ˵ÄÎÄÕ°ǹýÀ´,ÒÔ±¸¸´Ï°
²Î¿¼: http://blog.csdn.net/masefee/archive/2009/12/28/5090820.aspx
============================================================
֮ǰµÄ¶¨Î»¿ÉÄÜÖ÷ҪΪÁËÑо¿µ×²ã¼°Ò»Ð©½Ï¸´ÔÓµÄÎÊÌâÉÏ£¬¶øºöÂÔÁËһЩ³õѧµÄÅóÓÑ¡£µ¼ ......

C/C++ Ö®ÂÃ

ûÏëµ½ ûÏëµ½ ÍòÍòûÏëµ½
¶ÔC++°ËÇÏֻͨÁË7ÇϵÄÎÒ£¬¾¹È»Òª¿ªÊ¼¸ãc++Á˵Ä˵£¬ÕæÊǺò»´Ì¼¤¡£
²»¸ÒÏàÐÅ£¬²»¸ÒÏàÐÅ¡£
ÀàÐÍÊÇʲôÍæÒ⣿ÀàÔõôд£¿×Ö·û´®Ôõô´¦Àí£¿ÔõôÊÍ·ÅÄڴ棿
ż²»Öª£¬²»Öª£¬ÕæµÄ²»Öª¡£¡£¡£¡£
°¥       Í궼ÍêÁË¡£
°¦ ²»¹ÜÔõô˵¶¼ÒªÈ¥Ñ§µÄ¡£¡£¡£Ò»µãÕÞ¶¼Ã»ÓÐ
#incl ......

s3c2440»ùÓÚlinuxµÄbuttonºÍled×Ö·ûÉ豸Çý¶¯

ÏÈÊÇÄÚºËÇý¶¯³ÌÐò£º
#include <linux/module.h>//¾ßÌåµÄÍ·ÎļþλÖÃΪ/opt/FriendlyARM/mini2440/linux-2.6.29/include/linux/*.h
#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/poll.h>
#include <l ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ