Namespace
Varianti

Il linguaggio C++

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
 

Questa pagina contiene i costrutti principali del linguaggio C++.

Concetti fondamentali

Indice

[modifica] Temi generali

[modifica] Preprocessore

[modifica] Commenti

[modifica] Parole chiave

[modifica] Tabella ASCII

[modifica] Sequenze di escape

[modifica] La storia del C++

[modifica] Controllo del flusso

[modifica] Istruzioni condizionali

Le istruzioni condizionali eseguono diverse parti di codice a seconda del valore dell'espressione data.

  • if esegue parti di codice condizionalmente
  • switch esegue parti di codice secondo il valore di un argomento intero

[modifica] Istruzioni di iterazione

Le istruzioni di iterazione eseguono una parte di codice più volte.

[modifica] Istruzioni di salto

Le istruzioni di salto spostano l'esecuzione del programma in una posizione diversa.

  • continue salta la restante parte del corpo del ciclo
  • break termina il ciclo
  • goto continua l'esecuzione in un altra posizione
  • return termina l'esecuzione della funzione

[modifica] Funzioni

Lo stesso codice può essere riutilizzato in diverse posizioni del programma.

[modifica] Eccezioni

Le eccezioni sono un modo più robusto per segnalare condizioni di errore rispetto ai codici ritornati dalle funzioni o alle variabili globali di errore.

[modifica] Spazi dei nomi

Gli spazi dei nomi forniscono un modo per evitare conflitti sui nomi nei progetti di grandi dimensioni.

[modifica] Tipi

[modifica] Specifiers

[modifica] Inizializzazione

Ogni volta che una variabile denominata viene dichiarata, e ogni volta che un oggetto temporaneo viene creato, il valore iniziale del nuovo oggetto viene fornito attraverso uno dei seguenti meccanismi:
Original:
Whenever a named variable is declared, and whenever a temporary object is created, the initial value of the new object is provided through one of the following mechanisms:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifica] Letterali

Letterali sono i segni di un programma C + + che rappresentano valori costanti, incorporati nel codice sorgente.
Original:
Literals are the tokens of a C++ program that represent constant values, embedded in the source code.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifica] Espressioni

Un'espressione è una sequenza di operatori e operandi che specifica un calcolo. Un'espressione può comportare un valore e può causare effetti indesiderati.
Original:
An expression is a sequence of operators and operands that specifies a computation. An expression can result in a value and can cause side effects.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Common operators
assegnazione incrementNJdecrement aritmetica logico confronto memberNJaccess altra

a = b
a = rvalue
a += b
a -= b
a *= b
a /= b
a %= b
a &= b
a |= b
a ^= b
a <<= b
a >>= b

++a
--a
a++
a--

+a
-a
a + b
a - b
a * b
a / b
a % b
~a
a & b
a | b
a ^ b
a << b
a >> b

!a
a && b
a || b

a == b
a != b
a < b
a > b
a <= b
a >= b

a[b]
*a
&a
a->b
a.b
a->*b
a.*b

a(...)
a, b
(type) a
? :

Special operators
static_cast converte un tipo a un altro
tipo compatibile
Original:
static_cast converts one type to another compatible type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
dynamic_cast converte classe virtuale di base per class
derivato
Original:
dynamic_cast converts virtual base class to derived class
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
const_cast converte il tipo di tipo compatibile con diversi cv qualifiers
Original:
const_cast converts type to compatible type with different cv qualifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
reinterpret_cast converte tipo type
incompatibile
Original:
reinterpret_cast converts type to incompatible type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
new alloca memory
Original:
new allocates memory
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
delete dealloca memory
Original:
delete deallocates memory
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
sizeof interroga la dimensione di un type
Original:
sizeof queries the size of a type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
sizeof... interroga le dimensioni di un parametro confezione (dal C++11)
Original:
sizeof... queries the size of a parametro confezione (dal C++11)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
typeid interroga le informazioni sul tipo di una type
Original:
typeid queries the type information of a type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
noexcept controlla se un'espressione può lanciare una (dal C++11)
un'eccezione
Original:
noexcept checks if an expression can throw an exception (dal C++11)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
alignof query requisiti di allineamento di un (dal C++11) tipo
Original:
alignof queries alignment requirements of a type (dal C++11)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifica] Utilities

, 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.
, 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.
, Di allocazione 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.

[modifica] Classi

Le classi forniscono il concetto di programmazione orientata agli oggetti in C + +.
Original:
Classes provide the concept of object-oriented programming in C++.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifica] Specifiche per una classe di funzioni proprietà

[modifica] Funzioni membro speciali

[modifica] Modelli

Consente di funzioni e classi di operare su tipi generici
Original:
Allows functions and classes to operate on generic types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifica] Ottimizzazioni

[modifica] Varie