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

C preprocessor

http://en.wikipedia.org/wiki/C_preprocessor
C preprocessor
from Wikipedia, the free encyclopedia
Jump to:navigation, search
The C preprocessor (cpp) is the preprocessor for the C programming language. In many C implementations, it is a separate program invoked by the compiler as the first part of translation. The preprocessor handles directives for source file inclusion (#include), macro definitions (#define), and conditional inclusion (#if). The language of preprocessor directives is agnostic to the grammar of C, so the C preprocessor can also be used independently to process other types of files.
The transformations it makes on its input form the first four of C's so-called Phases of Translation. Though an implementation may choose to perform some or all phases simultaneously, it must behave as if it performed them one-by-one in order.
Contents
[hide]
1 Phases
2 Including files
3 Conditional compilation
4 Macro definition and expansion
4.1 Standard predefined positioning macros
4.2 Precedence
4.3 Multiple lines
4.4 Multiple evaluation of side effects
4.5 Token concatenation
4.6 Semicolons
4.6.1 Multiple statements
4.7 Quoting macro arguments
4.7.1 Indirectly quoting macro arguments
4.8 Variadic macros
4.9 X-Macros
4.10 Compiler-specific predefined macros
5 User-defined compilation errors and warnings
6 Compiler-specific preprocessor features
7 As a general-purpose preprocessor
8 See also
9 References
10 External links
[edit] Phases
The following are the first four (of eight) phases of translation specified in the C Standard:
Trigraph Replacement - The preprocessor replaces trigraph sequences with the characters they represent.
Line Splicing - Physical source lines that are continued with escaped newline sequences are spliced to form logical lines.
Tokenization - The preprocessor breaks the result into preprocessing tokens and whitespace. It replaces comments with whitespace.
Macro Expansion and Directive


Ïà¹ØÎĵµ£º

SD¿¨µÄдÎļþ ÒÔ¼° CÖÐ#·ûºÅ

Ò»  Ê×ÏÈ×ܽáÒ»ÏÂSD¿¨µÄдÎļþ£¬Ðè×¢ÒâµÄÊÂÏîÈçÏ£º
1. FAT16 дµÄʱºò±ØÐëÖÁÉÙдһ¸öÉÈÇø¡£
2. FAT±í²»ÄÜƵ·±µÄ¶Áд£¬·ñÔò»á³ö´í¡£ÉêÇëеÄÒ»¸ö´Øʱ£¬Ö±½ÓÔÚÕâ¸ö´ØÀïÃ棨¼´ÏÂÒ»´ØºÅ£©µÄдΪ0XFFFF¡£
3. FATËƺõ±ØÐëת»¯³Éu16²ÅÄÜд¡£Ã²ËÆÊÇÕâÑù£¬¾ßÌåû×Ðϸ¿´¡£
4. »ñȡеÄË÷Òý´ØµÄʱºò£¬Ö±½Ó´Ó¾ÉµÄË÷Òý´ØµÄºóÃæ ......

JSTL ʹÓà c:forEach

ÔÚ Web Ó¦ÓóÌÐò»·¾³ÖУ¬µü´úÖ÷ÒªÓÃÓڷôæºÍÏÔʾÊý¾Ý¼¯£¬Í¨³£ÊÇÒÔÁбí»ò±íÖеÄһϵÁÐÐеÄÐÎʽÏÔʾ¡£ÊµÏÖµü´úÄÚÈݵÄÖ÷Òª JSTL ²Ù×÷ÊÇ <c:forEach>; ¶¨ÖƱê¼Ç¡£¸Ã±ê¼ÇÖ§³ÖÁ½ÖÖ²»Í¬ÑùʽµÄµü´ú£ºÕûÊý·¶Î§Éϵĵü´ú£¨ÀàËÆ Java ÓïÑ﵀ for Óï¾ä£©ºÍ¼¯ºÏÉϵĵü´ú£¨ÀàËÆ Java ÓïÑ﵀ Iterator ºÍ Enumeration Àࣩ¡£
½øÐÐÕûÊ ......

¹ØÓÚC/C++ÖÐÄÚ´æ¿Õ¼äµÄ»®·Ö

CAPTION: ¹ØÓÚC/C++ÖÐÄÚ´æ¿Õ¼äµÄ»®·Ö
AUTHOR: aIsland Õª×ÔÖйúITʵÑéÊÒ
DATE: 2010-05-30
E-MAIL: aIsland@live.cn
QQ: 418662213
P.S.
     1.Bolanlan|ËæÐÄhigh|aIsland Èý¸öÍøÃû¾ùΪ±¾ÈË
     2.ÉùÃ÷aIsland ËùÊÕ¼µÄËùÓÐÎÄÕÂÆäÖø×÷Ȩ¶¼ÊôÓÚÔ­´´×÷Õß
   ......

C/C++º¯Êý²ÎÊý,´«ÖµÓò´«Ö·µÄÇø±ð!!!

/*
* File: main.cpp
* Author: Vicky
*
* Created on 2010Äê5ÔÂ8ÈÕ, ÏÂÎç2:47
*/
#include <iostream>
using namespace std;
class A{
public:
A(){
cout << "Ö´Ðй¹Ô캯Êý´´½¨Ò»¸ö¶ÔÏó" << endl;
}
A(A&){
cout << "Ö´Ðп½±´º¯Êý¿½±´Ò»¸ö¶ ......

c ºê¶¨Òå

¹ØÓÚ#ºÍ##ÔÚCÓïÑԵĺêÖУ¬#µÄ¹¦ÄÜÊǽ«ÆäºóÃæµÄºê²ÎÊý½øÐÐ×Ö·û´®»¯²Ù×÷£¨Stringfication£©£¬¼òµ¥Ëµ¾ÍÊÇÔÚ¶ÔËüËùÒýÓõĺê±äÁ¿Í¨¹ýÌæ»»ºóÔÚÆä×óÓÒ¸÷¼ÓÉÏÒ»¸öË«ÒýºÅ¡£±ÈÈçÏÂÃæ´úÂëÖеĺ꣺
#define WARN_IF(EXP)     \
     do{ if (EXP)     \
  & ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ