deleting multiple pointers in one line. c++
c++, comma-operator, pointers
Solution
It is equivalent to:
(((((delete p1),p2),p3),p4),p5);
That is, it `delete`s `p1` and then the comma operator is applied to the result (of which there is none) and `p2`. The expressions `p2` to `p5` are simply evaluated and the results discarded.
Problem
Does this delete all the pointers or does this just delete the first pointer p1? ``` delete p1,p2,p3,p4,p5; ```