Pointers definition

Which is the difference between defining a pointer like:

doublereal *muAnode = new double [Anode.Gas.nSpecies()]

and

doublereal * muAnode = [Anode.Gas.nSpecies()]


Thanks,


Ramon
The second does not compile, the first does after adding the missing semicolon.

By the way, spacing makes no difference at all. It is purely preference/convention.
Last edited on
Topic archived. No new replies allowed.