summaryrefslogtreecommitdiffhomepage
path: root/examples/complex.c
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2020-09-16 09:05:06 +0200
committerTyge Løvset <[email protected]>2020-09-16 09:05:06 +0200
commit47b096d57f2d716db40a9ec6e724c2a76038778d (patch)
treeb6720b8cef663aaf0bdd9f92fbd892e98a80a318 /examples/complex.c
parent0ce57669673a5a22d8207ec884bcebb97cb18448 (diff)
downloadSTC-modified-47b096d57f2d716db40a9ec6e724c2a76038778d.tar.gz
STC-modified-47b096d57f2d716db40a9ec6e724c2a76038778d.zip
Changed API to conform with std:: containers. cmap now only use first, second. for result and value types.
Diffstat (limited to 'examples/complex.c')
-rw-r--r--examples/complex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/complex.c b/examples/complex.c
index d3f2cf4e..aa746b90 100644
--- a/examples/complex.c
+++ b/examples/complex.c
@@ -22,14 +22,14 @@ int main() {
clist_y tableList = clist_ini;
// Put in some data.
cmap_g listMap = cmap_ini;
-
+
*carray2f_at(&table, y, x) = 3.1415927f; // table[y][x]
clist_y_push_back(&tableList, table);
cmap_g_put(&listMap, tableKey, tableList);
cmap_s_put(&myMap, strKey, listMap);
}
{ // Access the data entry
- carray2f table = *clist_y_back(&cmap_g_find(&cmap_s_find(&myMap, strKey)->value, tableKey)->value);
+ carray2f table = *clist_y_back(&cmap_g_find(&cmap_s_find(&myMap, strKey)->second, tableKey)->second);
printf("value (%d, %d) is: %f\n", y, x, *carray2f_at(&table, y, x));
}