this is a copy I pasted from another thread to let you know I got the problem
solved.
I found code that resolves my issue and I get
the formatting I want (which what I really want is a quantity of left-hand-side
digits and a qty of right-hand-side digits).
printf("precision=%d, d=%*.*f\n", w
yes, I forgot one. I also found code that resolves my issue and I get the
formatting I want (which what I really want is a quantity of lhs digits and a
qty of rhs digits.
printf("precision=%d, d=%*.*f\n", width, precision, d); //generates forever
loop of spaces, program hangs.
#include //std
http://en.cppreference.com/w/c/io/fprintf#Parameters
according to this and the old C book I have,
printf("%*.*f", width, precision, width, precision, value);
is wrong.
it should be
printf("%*.*f", width, precision, value);
see
http://stackoverflow.com/questions/16413609/printf-variable-
hmm. I got this example from p.85 of howard w sams & co.e3 The Waite Group's C
Primer Plus User-Friendly Guide to the C Programming Language Revised Edition.
ISBN 0-672-22582-4 (MSVC 4.x)
I didn't think it was in error. but books could be in error.
>
> From: K.