vendredi 4 août 2017

Confusion about 'auto' type deduction in C++

int i = 0;

is equivalent to

int i;
i = 0;

Then,

auto i = 0;

why not equivalent to

auto i;
i = 0;

Why compiler gives an error?

Aucun commentaire:

Enregistrer un commentaire