Espaços nominais
Variantes
Acções

Conceitos básicos

Da cppreference.com
< cpp‎ | language
 
 
Linguagem C++
Tópicos gerais
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.
Controle de fluxo
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.
Declarações execução condicional
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.
Instruções de iteração
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.
Ir declarações
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.
Funções
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
declaração da função
lambda declaração da função
modelo de função
linha especificador
especificações de exceção (obsoleta)
noexcept especificador (C++11)
Exceções
Original:
Exceptions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Namespaces
Original:
Namespaces
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
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.
decltype specifier (C++11)
Especificadores
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 especificadores
armazenamento duração especificadores
constexpr especificador (C++11)
auto especificador (C++11)
alignas especificador (C++11)
Inicialização
Original:
Initialization
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Literais
Original:
Literals
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Expressões
Original:
Expressions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
representações alternativas
Utilitários
Original:
Utilities
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
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.
typedef declaration
tipo de alias declaração (C++11)
atributos (C++11)
Conversões
Original:
Casts
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
conversões implícitas
const_cast conversion
static_cast conversion
dynamic_cast conversion
reinterpret_cast conversion
Elenco C-estilo e funcional
Alocação de memória
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.
Classes
Original:
Classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Classe propriedades específicas de função
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.
Funções membro especiais
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.
Modelos
Original:
Templates
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
modelo de classe
modelo de função
especialização de modelo
pacotes de parâmetros (C++11)
Diversos
Original:
Miscellaneous
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Assembly embutido
 
 

Essa seção provê definições para a terminologia específica e os conceitos usados ao descrever a linguagem de programação C++.

Um programa C++ é uma sequência de arquivos de texto (tipicamente arquivos de cabeçalho/header e fonte/source) que contêm declarações. Eles passam por tradução para se tornar um programa executável, que é executado quando a implementação C++ chama sua função main.

Certas palavras em C++ tem significado especial, e são conhecidas como palavras-chave. Outras podem ser usadas como identificadores. Comentários são ignorados durante tradução. Certos caracteres no programa têm que ser representados com sequências de escape.

As entidades de um programa C++ são valores, objetos, referências, bindings estruturados (desde C++17), funções, enumeradores, tipos, membros de classe, templates, especializações de template, namespaces, e pacotes de parâmetro. Macros do preprocessador não são entidades C++.

Declarações podem introduzir entidades, associá-las a nomes e definir suas propriedades. As declarações que definem todas as propriedades necessárias para usar uma entidade são definições. Um programa deve conter somente uma definição de qualquer função não-inline ou variável que é usada por ODR.

Definições de funções geralmente incluem sequências de instruções, alguns dos quais incluem expressões, as quais especificam as operações realizadas pelo programa.

Nomes encontrados em um programa são associados com as declarações que os introduziram usando busca de nomes. Cada nome só é válido dentro de uma parte do programa chamada de seu escopo. Alguns nomes têm ligação que os fazem se referir às mesmas entidades quando aparecem em escopos ou unidades de tradução diferentes.

Cada objeto, referência, função, expressão em C++ é associada a um tipo, que pode ser fundamental, composto, ou definido pelo usuário, completo ou incompleto, etc.

Objetos declarados e referências declaradas que não são membros de dados não-estáticos são chamados variáveis.

[editar] Veja também

Documentação C para Conceitos básicos