lundi 28 novembre 2016

Syntaxe C++11 « type var : var » is called « range-based for »

In an example regarding std::codecvt seen on: http://ift.tt/1kcsd2u

There was this syntax

for (char16_t c : str16)

knowing that str16 is a variable (l-value) std::u16string str16

What does it mean? That's what I call type var : var in the title.

PS: Is there a topic referencing all the particular syntaxes? The rare one?

Recently I saw

int ackermann(m,n)
int m,n; 
{
    // function definition
}

Aucun commentaire:

Enregistrer un commentaire