type *var -- vs. -- type* var
SMITHJ at ohstpy.mps.ohio-state.edu
SMITHJ at ohstpy.mps.ohio-state.edu
Sat Sep 9 03:18:38 AEST 1989
I have been learning C++ from a book by Bjarne and he consistently declares
pointers with
type* var;
rather than
type *var;
At first I thought it was a C++ extension but when I tried it on my VAX/VMS
compiler it accepted the latter. Why is this allowed? It would be nice to
use type* to declare a series of pointers but this notation currently just
names the first var a pointer and the rest a regular variables.
i.e.
int* x, y, z;
is equivalent to
int *x, y, z;
rather than
int *x, *y, *z;
as would be intuitive (to me anyway).
--
They have one big advantage over us:
*they* know where they're going.
Has your family tried 'em, Powdermilk?
/* Jeffery G. Smith, BS-RHIT (AKA Doc. Insomnia, WMHD-FM) *
* The Ohio State University, Graduate Physics Program *
* 3193 Smith Lab, Columbus, OH 43210 (614) 292-5321 *
* smithj at ohstpy.mps.ohio-state.edu */
More information about the Comp.lang.c
mailing list