dimanche 22 février 2015

How to know if 2 pointers point to the same array


If a pointer p has been created as a dynamic array



double* p = new double[n]


a pointer q is said to point to the same array if q has been defined as q = p + k with 0 <= k <= n. Is there a way to know if 2 given pointers that point to some arrays point to the same array?




Aucun commentaire:

Enregistrer un commentaire