summaryrefslogtreecommitdiffhomepage
path: root/examples/advanced.c
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2020-11-26 15:08:07 +0100
committerTyge Løvset <[email protected]>2020-11-26 15:08:07 +0100
commitbdea38e432d109ba416d7f980f124da285d69a4f (patch)
treeeffeb89e993b01f374d5a44ce0b859f979ed7f27 /examples/advanced.c
parent65ad066312ed549472814e1576cec2f0dc0f51ea (diff)
downloadSTC-modified-bdea38e432d109ba416d7f980f124da285d69a4f.tar.gz
STC-modified-bdea38e432d109ba416d7f980f124da285d69a4f.zip
Removed stc/cfmt.h, as _Generic requires C11. I have made it a gist: https://gist.github.com/tylov/bcc956a4779f1d14204e66a14f17beb9
All examples are reverted to use printf() instead of c_print().
Diffstat (limited to 'examples/advanced.c')
-rw-r--r--examples/advanced.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/advanced.c b/examples/advanced.c
index d559e154..280d5ce4 100644
--- a/examples/advanced.c
+++ b/examples/advanced.c
@@ -11,7 +11,7 @@
* of the Viking struct, to simplfy insert and lookup in the map.
*/
#include <stc/cmap.h>
-#include <stc/cfmt.h>
+#include <stc/cstr.h>
// Viking data struct -----------------------
@@ -73,7 +73,7 @@ int main()
cmap_vk_emplace(&vikings, einar, 0).first->second += 5; // again
c_foreach (k, cmap_vk, vikings) {
- c_print(1, "{} of {} has {} HP\n", k.val->first.name.str, k.val->first.country.str, k.val->second);
+ printf("%s of %s has %d HP\n", k.val->first.name.str, k.val->first.country.str, k.val->second);
}
cmap_vk_del(&vikings);
}