3 ms·
A* -> void* -> A* is legal A* -> void* -> B* is undefined A* -> B* is undefined If you want to get the first element, you want, &(A->first), not a cast. The
by richardwhiuk 6y ago
A* -> void* -> A* is legal
A* -> void* -> B* is undefined
A* -> B* is undefined
If you want to get the first element, you want, &(A->first), not a cast. The cast isn't guaranteed to be defined, and isn't guaranteed to be the same.