int n;
int *p1;
p1 = &n;
or
int *p, *p1;
p = new int;
p1 = p;
I suspect most people here would prefer the first, since you don't have to
manage the memory yourself. There's rarely a reason to "new" a single
integer. But even with a more complex object, it's much easier to work with
automatic memory than with dynamic allocation. Unless you really need to
use new, why bother?
One other thing. It's also usually better to initialize an object at the
point of declaration, when possible, like this:
X* p = new X;
X* p1 = p;
-Howard