summaryrefslogtreecommitdiffhomepage
path: root/examples/sidebyside.cpp
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2021-12-22 09:14:44 +0100
committerTyge Løvset <[email protected]>2021-12-22 09:14:44 +0100
commit7a30e2853792870a1d85087861e46a1ae1ca6b0e (patch)
tree7d80cf17076c347683e1039fcb192e819664ae26 /examples/sidebyside.cpp
parentf69f26927edb7e2850a5a235ed5117f278f437a1 (diff)
downloadSTC-modified-7a30e2853792870a1d85087861e46a1ae1ca6b0e.tar.gz
STC-modified-7a30e2853792870a1d85087861e46a1ae1ca6b0e.zip
Minor example update.
Diffstat (limited to 'examples/sidebyside.cpp')
-rw-r--r--examples/sidebyside.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/examples/sidebyside.cpp b/examples/sidebyside.cpp
index 85fea774..435b37f6 100644
--- a/examples/sidebyside.cpp
+++ b/examples/sidebyside.cpp
@@ -8,11 +8,12 @@
#define i_key int
#define i_val int
-#include <stc/cmap.h>
+#include <stc/csmap.h>
int main() {
{
- std::map<std::string, int> food = {{"burger", 5}, {"pizza", 12}, {"steak", 15}};
+ std::map<std::string, int> food =
+ {{"burger", 5}, {"pizza", 12}, {"steak", 15}};
for (auto i: food)
std::cout << i.first << ", " << i.second << std::endl;
std::cout << std::endl;
@@ -35,12 +36,12 @@ int main() {
std::cout << i.first << ", " << i.second << std::endl;
std::cout << std::endl;
}
- c_auto (cmap_int, hist)
+ c_auto (csmap_int, hist)
{
- ++ cmap_int_emplace(&hist, 12, 100).ref->second;
- ++ cmap_int_emplace(&hist, 13, 100).ref->second;
- ++ cmap_int_emplace(&hist, 12, 100).ref->second;
- c_foreach (i, cmap_int, hist)
+ ++ csmap_int_emplace(&hist, 12, 100).ref->second;
+ ++ csmap_int_emplace(&hist, 13, 100).ref->second;
+ ++ csmap_int_emplace(&hist, 12, 100).ref->second;
+ c_foreach (i, csmap_int, hist)
printf("%d, %d\n", i.ref->first, i.ref->second);
puts("");
}