diff --git a/guide/english/algorithms/graph-algorithms/depth-first-search/index.md b/guide/english/algorithms/graph-algorithms/depth-first-search/index.md index 2fd89d85cf..9e4455b6b2 100644 --- a/guide/english/algorithms/graph-algorithms/depth-first-search/index.md +++ b/guide/english/algorithms/graph-algorithms/depth-first-search/index.md @@ -12,7 +12,7 @@ Depth First Search is one of the most simple graph algorithms. It traverses the ### Implementation (C++14) - ```c++ + ```cpp #include #include #include @@ -93,7 +93,7 @@ Worse Case Time Complexity: O(n) Depth First Search is complete on a finite set of nodes. I works better on shallow trees. ### Implementation of DFS in C++ -```c++ +```cpp #include #include #include diff --git a/guide/english/algorithms/sorting-algorithms/bubble-sort/index.md b/guide/english/algorithms/sorting-algorithms/bubble-sort/index.md index ed63749f95..1419344d51 100644 --- a/guide/english/algorithms/sorting-algorithms/bubble-sort/index.md +++ b/guide/english/algorithms/sorting-algorithms/bubble-sort/index.md @@ -108,7 +108,7 @@ public class BubbleSort { } ``` ### Example in C++ -```c++ +```cpp // Recursive Implementation void bubblesort(int arr[], int n) { diff --git a/guide/english/algorithms/sorting-algorithms/heap-sort/index.md b/guide/english/algorithms/sorting-algorithms/heap-sort/index.md index 3fad7652a2..1f6b5d9a3b 100644 --- a/guide/english/algorithms/sorting-algorithms/heap-sort/index.md +++ b/guide/english/algorithms/sorting-algorithms/heap-sort/index.md @@ -64,7 +64,7 @@ public class Heapsort { } ``` Implementation in C++ -```C++ +```cpp #include using namespace std; void heapify(int arr[], int n, int i) diff --git a/guide/english/cplusplus/input-and-output/index.md b/guide/english/cplusplus/input-and-output/index.md index cb4ffe637f..0184b27878 100644 --- a/guide/english/cplusplus/input-and-output/index.md +++ b/guide/english/cplusplus/input-and-output/index.md @@ -11,7 +11,7 @@ To print things to the console, or read from it, you use `cout` and `cin`, which The "Hello World" program uses `cout` to print "Hello World!" to the console: ```cpp -#include +#include using namespace std; int main() diff --git a/guide/english/cplusplus/map/index.md b/guide/english/cplusplus/map/index.md index 41e8d36146..d4659e05ee 100644 --- a/guide/english/cplusplus/map/index.md +++ b/guide/english/cplusplus/map/index.md @@ -15,7 +15,7 @@ title: Map Here is an example: -```c++ +```cpp #include #include @@ -66,7 +66,7 @@ size of map is 1 ## Insertion Inserting data with insert member function. -```c++ +```cpp myMap.insert(make_pair("earth", 1)); myMap.insert(make_pair("moon", 2)); ``` @@ -114,7 +114,7 @@ value of def is 2 ## Accessing map elements To access map elements, you have to create iterator for it. Here is an example as stated before. -```c++ +```cpp map::iterator it; for(it=first.begin(); it!=first.end(); ++it){ cout << it->first << " => " << it->second << '\n'; diff --git a/guide/portuguese/computer-science/data-structures/stacks/index.md b/guide/portuguese/computer-science/data-structures/stacks/index.md index aa8c89efaf..9f4c6b32e7 100644 --- a/guide/portuguese/computer-science/data-structures/stacks/index.md +++ b/guide/portuguese/computer-science/data-structures/stacks/index.md @@ -17,7 +17,7 @@ Algumas operações básicas da pilha são: A implementação de uma pilha é possível usando arrays ou listas vinculadas. A seguir, uma implementação de matriz simples da estrutura de dados da pilha com suas operações mais comuns. -```C++ +```cpp //Stack implementation using array in C++ //You can also include and then use the C++ STL Library stack class. diff --git a/guide/portuguese/cplusplus/for-loop/index.md b/guide/portuguese/cplusplus/for-loop/index.md index 47ce1b2945..98ed083869 100644 --- a/guide/portuguese/cplusplus/for-loop/index.md +++ b/guide/portuguese/cplusplus/for-loop/index.md @@ -37,7 +37,7 @@ A instrução de atualização é usada para alterar a variável de loop usando ## IMPLEMENTAÇÃO: -```C++ +```cpp #include using namespace std; // Here we use the scope resolution operator to define the scope of the standar functions as std:: diff --git a/guide/russian/cplusplus/arrays/index.md b/guide/russian/cplusplus/arrays/index.md index d4fb630e89..8a7477cfde 100644 --- a/guide/russian/cplusplus/arrays/index.md +++ b/guide/russian/cplusplus/arrays/index.md @@ -8,13 +8,13 @@ localeTitle: Массивы C ++ Например, массив, содержащий 5 целых чисел (int), объявляется так: -```C++ +```cpp int numbers [5]; ``` Начальное заполнение значений при объявлении массива (initializiation): -```C++ +```cpp //Initialization with entries: int numbers [5] = {1, 2, 3, 4, 5}; @@ -34,7 +34,7 @@ int numbers [5]; Элементы из массива можно получить через ссылку на их позицию в массиве. (Отсчет начинается с 0). Пример: -```C++ +```cpp x = numbers[0]; // = 1. [0] == first position numbers[2] = 55; // Sets the third position (3) to the new number 55 //numbers[] is now: {1, 2, 55, 4, 5} diff --git a/guide/spanish/algorithms/search-algorithms/binary-search/index.md b/guide/spanish/algorithms/search-algorithms/binary-search/index.md index dbc1cfd536..11b1ad58de 100644 --- a/guide/spanish/algorithms/search-algorithms/binary-search/index.md +++ b/guide/spanish/algorithms/search-algorithms/binary-search/index.md @@ -174,7 +174,7 @@ int binarySearch(int a[], int l, int r, int x) { ### Implementación C / C ++ -```C++ +```cpp int binary_search(int arr[], int l, int r, int target) { if (r >= l) @@ -208,7 +208,7 @@ def binary_search(arr, l, r, target): ### Ejemplo en C ++ -```c++ +```cpp // Binary Search using iteration int binary_search(int arr[], int beg, int end, int num) { @@ -225,7 +225,7 @@ def binary_search(arr, l, r, target): } ``` -```c++ +```cpp // Binary Search using recursion int binary_search(int arr[], int beg, int end, int num) { diff --git a/guide/spanish/cplusplus/arrays/index.md b/guide/spanish/cplusplus/arrays/index.md index 06b6e2019b..74db58aa4a 100644 --- a/guide/spanish/cplusplus/arrays/index.md +++ b/guide/spanish/cplusplus/arrays/index.md @@ -8,13 +8,13 @@ Una matriz es una serie de elementos del mismo tipo de datos que se almacenan en Por ejemplo, una matriz que contiene 5 valores enteros llamados números se declara así: -```C++ +```cpp int numbers [5]; ``` Inicialización: -```C++ +```cpp //Initialization with entries: int numbers [5] = {1, 2, 3, 4, 5}; @@ -34,7 +34,7 @@ Inicialización: Se puede acceder a los elementos de una matriz a través de la referencia de su posición en la matriz. (Comience contando desde 0). Ejemplo: -```C++ +```cpp x = numbers[0]; // = 1. [0] == first position numbers[2] = 55; // Sets the third position (3) to the new number 55 //numbers[] is now: {1, 2, 55, 4, 5} diff --git a/guide/spanish/cplusplus/for-loop/index.md b/guide/spanish/cplusplus/for-loop/index.md index 62c8e89fed..c1b9412ab3 100644 --- a/guide/spanish/cplusplus/for-loop/index.md +++ b/guide/spanish/cplusplus/for-loop/index.md @@ -37,7 +37,7 @@ La instrucción de actualización se usa para alterar la variable del bucle medi ## IMPLEMENTACIÓN: -```C++ +```cpp #include using namespace std; // Here we use the scope resolution operator to define the scope of the standar functions as std::