July 30th, 2004, 4:22 pm
there is a good reason to preferfunc(const double &x) instead offunc(double x).in the former, x is passed by referemce in the latter a copy is made of x. If x were a large blob rather than a double then its more efficienet to pass a reference (pointer) to it than to copy it. Also, by declaring x as const, you can be sure that ist not going to get modified on return.
knowledge comes, wisdom lingers