Pagini recente » Borderou de evaluare (job #292766) | Borderou de evaluare (job #1106216) | Borderou de evaluare (job #3258549) | Borderou de evaluare (job #665887) | Diferente pentru blog/cpp11 intre reviziile 47 si 46
Diferente pentru
blog/cpp11 intre reviziile
#47 si
#46
Nu exista diferente intre titluri.
Diferente intre continut:
h3. 2. range-based for loops
In $C++11$, you can write less code to iterate over every element in a list of elements:
In $C++11$, you can iterate over each element in a list with less code:
== code(cpp) |
int array[5] = {1, 2, 3, 4, 5};
}
==
If you want to modify the elements in the list, you need to get a reference to the current element:
If you want to modify the elements in the list, you need to get a reference to the current element like this:
== code(cpp) |
double array[5] = {1.5, 2.7, 3.9};
Nu exista diferente intre securitate.
Topicul de forum nu a fost schimbat.