summaryrefslogtreecommitdiffstats
path: root/tips
diff options
context:
space:
mode:
Diffstat (limited to 'tips')
-rw-r--r--tips/formatting.adoc5
1 files changed, 4 insertions, 1 deletions
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: