Espacios de nombres
Variantes

Diferencia entre revisiones de «cpp/language»

De cppreference.com
< cpp
Translated from the English version using Google Translate
m 1 revisión: Translate from the English version
(Sin diferencias)

Revisión del 21:19 25 oct 2012

 
 
Lenguaje C++
Temas generales
Control de flujo
Instrucciones de ejecución condicionales
Instrucciones de iteración (bucles)
Declaraciones de salto
Funciones
Declaración de funciones
Declaración de funciones lambda
Especificador inline
Especificación de excepciones (hasta C++20)
Especificador noexcept (C++11)
Excepciones
Espacios de nombres
Tipos
Especificadores
decltype (C++11)
auto (C++11)
alignas (C++11)
Especificadores de duración de almacenamiento
Inicialización
Expresiones
Representaciones alternas
Literales
Booleanos - Enteros - De punto flotante
De carácter - De cadena - nullptr (C++11)
Definidos por el usuario (C++11)
Utilidades
Atributos (C++11)
Tipos
Declaración de typedef
Declaración de alias de tipo (C++11)
Conversiones
Conversiones implícitas - Conversiones explícitas
static_cast - dynamic_cast
const_cast - reinterpret_cast
Asignación de memoria
Clases
Propiedades de funciones específicas de la clase
Funciones miembro especiales
Plantillas
Misceláneos
 
Esta es una breve referencia de disponibles lenguaje C + + construcciones .
Original:
This is a brief reference of available C++ language constructs.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Los temas generales

Preprocessor

Comentarios

Palabras clave

Tabla ASCII

Las secuencias de escape

Historia de C + +

Control de flujo

Sentencias condicionales ejecución

Las sentencias condicionales ejecutar diferentes rutas de código de acuerdo con el valor de la expresión dada .
Original:
Conditional statements execute different code paths according to the value of given expression.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • if ejecuta el código de forma condicional
    Original:
    if executes code conditionally
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • switch ejecuta el código de acuerdo con el valor de un argumento integral
    Original:
    switch executes code according to the value of an integral argument
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.

Instrucciones de iteración

Instrucciones de iteración ejecutar una ruta de código varias veces .
Original:
Iteration statements execute a code path multiple times.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Ir declaraciones

Instrucciones de salto continuar la ejecución del programa en un lugar diferente .
Original:
Jump statements continue program execution at a different location.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • continue se salta la parte restante del cuerpo del bucle envolvente
    Original:
    continue skips the remaining part of the enclosing loop body
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • break termina el bucle envolvente
    Original:
    break terminates the enclosing loop
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • goto que continúa la ejecución en otra ubicación
    Original:
    goto continues execution in another location
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • return termina la ejecución de la función envolvente
    Original:
    return terminates execution of the enclosing function
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.

Funciones

El mismo código puede ser reutilizado en diferentes localizaciones en el programa .
Original:
The same code can be reused at different locations in the program.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Excepciones

Las excepciones son una forma más robusta para indicar condición de error que los códigos de retorno de la función o variables globales error .
Original:
Exceptions are a more robust way to signal error condition than function return codes or global error variables.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Los espacios de nombres

Espacios de nombres proporcionan una manera de evitar conflictos de nombres en grandes proyectos .
Original:
Namespaces provide a way to prevent name clashes in large projects.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Tipos

Los especificadores

Inicialización

Siempre que una variable llamada se declara, y cada vez que un objeto temporal se crea, el valor inicial del nuevo objeto se proporciona a través de uno de los mecanismos siguientes:
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.

Los literales

Los literales son las señales de un programa en C + + que representan los valores constantes, embebidos en el código fuente .
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.

Expresiones

Una expresión es una secuencia de operadores y operandos que especifica un cálculo. Una expresión puede resultar en un valor y puede causar efectos secundarios .
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.
Operadores comunes
Asignación Incremento/decremento Aritméticos Lógicos Comparación Acceso a miembro Otros

a = b 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[b] *a &a a->b a.b a->*b a.*b

a(...) a, b ? :

Operadores especiales

static_cast Convierte de un tipo a otro tipo relacionado
dynamic_cast Convierte dentro de jerarquías de herencia
const_cast Añade o suprime los calificadores const/volatile
reinterpret_cast Convierte un tipo a un tipo no relacionado
conversión estilo C Convierte un tipo a otro mediante una mezcla de static_cast, const_cast, y reinterpret_cast
new Crea objetos con duración de almacenamiento dinámica
delete Destruye objetos previamente creados por la expresión new y libera el área de memoria obtenida
sizeof Consulta el tamaño de un tipo
sizeof... Consulta el tamaño de un paquete de parámetros (desde C++11)
typeid Consulta la información de un tipo
noexcept Comprueba si una expresión puede lanzar una excepción (desde C++11)
alignof Consulta requisitos de alineación de un tipo (desde C++11)

Utilidades

, Tipos
Original:
; Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
; Yesos
Original:
; Casts
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
, Asignación de 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.

Clases

Las clases proporcionan el concepto de programación orientada a objetos en 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.

Clase propiedades específicas de la función

Funciones especiales miembro

Plantillas

Permite funciones y clases para operar con los tipos genéricos
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.

Optimizaciones

Varios