mercredi 24 juin 2015

Const pointer to pointer to const int casts to const pointer to pointer to int

Here's the code:

int *const *a = nullptr;
int const *const *b = nullptr;

b = a;

Why does this code compile and run without error? Doesn't const pointer mean that we can't change it?

Aucun commentaire:

Enregistrer un commentaire