Namespace
Varianti

Comments

Da cppreference.com.
< cpp

 
 
Linguaggio C + +
Temi generali
Original:
General topics
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Controllo del flusso
Original:
Flow control
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Dichiarazioni esecuzione condizionale
Original:
Conditional execution statements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Iterazione dichiarazioni
Original:
Iteration statements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Vai dichiarazioni
Original:
Jump statements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Funzioni
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
dichiarazione di funzione
lambda funzione dichiarazione
funzione di modello
specificatore inline
eccezioni specifiche (deprecato)
noexcept specificatore (C++11)
Eccezioni
Original:
Exceptions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Spazi dei nomi
Original:
Namespaces
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Tipi
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
decltype specifier (C++11)
Specifiers
Original:
Specifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
cv specificatori
Durata di stoccaggio specificatori
constexpr specificatore (C++11)
specificatore auto (C++11)
alignas specificatore (C++11)
Inizializzazione
Original:
Initialization
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Letterali
Original:
Literals
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Espressioni
Original:
Expressions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
rappresentazioni alternative
Utilities
Original:
Utilities
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Tipi
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
typedef declaration
Tipo alias dichiarazione (C++11)
attributi (C++11)
Lancia
Original:
Casts
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
conversioni implicite
const_cast conversion
static_cast conversion
dynamic_cast conversion
reinterpret_cast conversion
Fusione C-stile e funzionale
Occupazione della memoria
Original:
Memory allocation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Classi
Original:
Classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Specifiche per una classe di funzioni proprietà
Original:
Class-specific function properties
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
esplicito (C++11)
statico
Funzioni membro speciali
Original:
Special member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Modelli
Original:
Templates
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
classe template
funzione di modello
modello di specializzazione
parametri confezioni (C++11)
Varie
Original:
Miscellaneous
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Montaggio in linea
 
Commenti servire come una sorta di in-codice documentazione. Quando inserito in un programma di essi sono effettivamente ignorato dal compilatore, sono esclusivamente destinati ad essere utilizzati come note dagli umani che leggono il codice sorgente. Anche se la documentazione specifica non fa parte del C + + standard, esistono diverse utility che i commenti di analisi con diversi formati di documentazione.
Original:
Comments serve as a sort of in-code documentation. When inserted into a program, they are effectively ignored by the compiler; they are solely intended to be used as notes by the humans that read source code. Although specific documentation is not part of the C++ standard, several utilities exist that parse comments with different documentation formats.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Indice

[modifica] Sintassi

/* comment */ (1)
// comment\n (2)
1)
Spesso conosciuto come "tipo C" o "multi-line" commenti.
Original:
Often known as "C-style" or "multi-line" comments.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
2)
Spesso conosciuto come "C + + in stile" o "single-line" commenti.
Original:
Often known as "C++-style" or "single-line" comments.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifica] C-stile

C-style commenti sono di solito utilizzati per commentare grandi blocchi di testo, tuttavia, possono essere utilizzati per commentare singole linee. Per inserire un commento in stile C, semplicemente scrivi il testo con /* e */, questo farà sì che il contenuto del commento deve essere ignorato dal compilatore. Anche se non fa parte del C + + standard, /** e */ sono spesso utilizzati per indicare i blocchi di documentazione, questo è legale perché l'asterisco secondo è semplicemente trattato come parte del commento. Di tipo C i commenti non possono essere annidati.
Original:
C-style comments are usually used to comment large blocks of text, however, they can be used to comment single lines. To insert a C-style comment, simply surround text with /* and */; this will cause the contents of the comment to be ignored by the compiler. Although it is not part of the C++ standard, /** and */ are often used to indicate documentation blocks; this is legal because the second asterisk is simply treated as part of the comment. C-style comments cannot be nested.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
C-stile osservazioni sono spesso preferiti in ambienti in cui C e C + + codice possono essere mescolati, perché sono l'unica forma di commento che può essere utilizzato nello standard C (prima C99).
Original:
C-style comments are often preferred in environments where C and C++ code may be mixed, because they are the only form of comment that can be used in the C standard (prior to C99).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifica] C + + stile

C-style commenti sono di solito usato per commentare singole linee, tuttavia, più C + + di tipo commenti possono essere messi insieme per formare commenti su più righe. C + + in stile commenti dire al compilatore di ignorare tutti i contenuti tra // e una nuova linea, che li rende molto utili.
Original:
C-style comments are usually used to to comment single lines, however, multiple C++-style comments can be placed together to form multi-line comments. C++-style comments tell the compiler to ignore all content between // and a new line, which makes them very useful.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifica] Esempio

/* C-style comments can contain
multiple lines */
/* or just one */
 
// C++-style comments can comment one line
 
// or, they can
// be strung together
 
int main()
{
  // The below code won't be run
  // return 1;
 
  // The below code will be run
  return 0;
}