Preprocessor
Da cppreference.com
< cpp
![]() |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
O pré-processador é executado antes da compilação começa. O resultado do pré-processamento é único arquivo que é então passado para o compilador real.
Original:
The preprocessor runs before the compilation begins. The result of preprocessing is single file which is then passed to the actual compiler.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[editar] Directivas
As directivas de pré-processamento controlam o comportamento do pré-processador. Cada directiva ocupa uma linha e tem o seguinte formato:
Original:
The preprocessing directives control the behavior of the preprocessor. Each directive occupies one line and has the following format:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
-
#
personagemOriginal:#
characterThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - pré-processamento de instruções (um dos
define
,undef
,include
,if
,ifdef
,ifndef
,else
,elif
,endif
,line
,error
,warning
,pragma
)Original:preprocessing instruction (one ofdefine
,undef
,include
,if
,ifdef
,ifndef
,else
,elif
,endif
,line
,error
,warning
,pragma
)The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - argumentos (depende da instrução)Original:arguments (depends on the instruction)The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - quebra de linhaOriginal:line breakThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
A directiva nulo (
#
seguido de uma quebra de linha) é permitido e não tem nenhum efeito.Original:
The null directive (
#
followed by a line break) is allowed and has no effect.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[editar] Capacidades
O pré-processador tem a fonte de recursos de tradução de arquivo:
Original:
The preprocessor has the source file translation capabilities:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
- ' compilação de partes do arquivo de origem (controlada pela directiva
#if
,#ifdef
,#ifndef
,#else
,#elif
e#endif
).Original:condicionalmente</div> compile of parts of source file (controlled by directiveOriginal:conditionallyThe text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.#if
,#ifdef
,#ifndef
,#else
,#elif
and#endif
).The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - ' replace' macros de texto enquanto possivelmente concatenando ou citar identificadores (controlado por directivas
#define
e#undef
, e os operadores#
e##
)Original:replace text macros while possibly concatenating or quoting identifiers (controlled by directives#define
and#undef
, and operators#
and##
)The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - 'include' outros arquivos (controlado por
#include
directiva)Original:include other files (controlled by directive#include
)The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - causar um 'warning' (controlada pela directiva
#warning
)Original:cause a warning (controlled by directive#warning
)The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - causar um 'error' (controlada pela directiva
#error
)Original:cause an error (controlled by directive#error
)The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Os seguintes aspectos do pré-processador pode ser controlado:
Original:
The following aspects of the preprocessor can be controlled:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
- ' comportamento (controlado por directivas
#pragma
)Original:implementação definido</div> behavior (controlled by directivesOriginal:implementation definedThe text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.#pragma
)The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - ' disponível para o pré-processador (controlada por directivas
#line
)Original:nome do arquivo e informações de linha</div> available to the preprocessor (controlled by directivesOriginal:file name and line informationThe text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.#line
)The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.