From ce58d6504665422a0817cf0ddb38fc533d0de33e Mon Sep 17 00:00:00 2001 From: Mitsuo Tokumori Date: Sun, 27 Nov 2022 14:01:07 -0500 Subject: Little changes to formatting.adoc --- tips/formatting.adoc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tips') diff --git a/tips/formatting.adoc b/tips/formatting.adoc index 58c5251..96b4e71 100644 --- a/tips/formatting.adoc +++ b/tips/formatting.adoc @@ -35,7 +35,7 @@ Example implementation: // https://stackoverflow.com/q/7186504/7498073 // Width-Left (use with strings) -#define WL(w) " " << setw((w) - 1) << left << setprecision(2) << fixed +#define WL(w) " " << setw((w) - 1) << left // Width-Right (use with numbers) #define WR(w) setw(w) << right << setprecision(2) << fixed @@ -51,7 +51,10 @@ Example implementation: << '/' << WR0(2, 2, (x) / 100 % 100) \ << '/' << WR0(4, 4, (x) / 10000) +// (for character arrays) #define MAXLEN 100 +// (for static arrays of items) +#define MAXITEMS 1000 ---- Example usage: -- cgit v1.2.3