Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!rutgers!dptg!ulysses!andante!alice!ark From: ark@alice.UUCP (Andrew Koenig) Newsgroups: comp.lang.c++ Subject: Re: New Begginer Questions. Message-ID: <9884@alice.UUCP> Date: 11 Sep 89 12:16:39 GMT References: <4202@ohstpy.mps.ohio-state.edu> Organization: AT&T Bell Laboratories, Liberty Corner NJ Lines: 26 In article <4202@ohstpy.mps.ohio-state.edu>, SMITHJ@ohstpy.mps.ohio-state.edu writes: > 1. Is the declaration type* var; common in C++ programs as opposed to type *var > and if so why. I find that it misleads one to beleave that the declaration > type* x, y; > would be interpreted as > type *x, *y; > rather than the correct > type *x, y; If you use the style type* x; then it would be wise to declare only one variable at a time. The particular choice of layout is, as usual, a matter of (sometimes hotly debated) personal preference. So are indentation and other such things. > 2. Why the addition of the typecast convention type(var) when (type)var > already exists. So that you can write, for example, Complex(3,4) to mean 3+4i. -- --Andrew Koenig ark@europa.att.com