diff options
| author | Tyge Løvset <[email protected]> | 2022-04-15 22:09:22 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-04-15 22:09:22 +0200 |
| commit | 19a29acc7d2a54edd7f5a4e7f653cb5d1703a09c (patch) | |
| tree | bee31d8a58b4d9124e0c43956e0c6d4fe490da1d /examples | |
| parent | fa261ddd307de9b7bb2965a066fd83b66d8d83a7 (diff) | |
| parent | 5d1de359348733896b6d4448a465ce3b7d9d0684 (diff) | |
| download | STC-modified-19a29acc7d2a54edd7f5a4e7f653cb5d1703a09c.tar.gz STC-modified-19a29acc7d2a54edd7f5a4e7f653cb5d1703a09c.zip | |
Merge branch 'master' of github.com:tylov/STC
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/list.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/list.c b/examples/list.c index 2d672cf3..fd923719 100644 --- a/examples/list.c +++ b/examples/list.c @@ -10,7 +10,7 @@ int main() { int k;
const int n = 2000000;
- c_auto (clist_fx, list)
+ c_auto (clist_fx, list)
{
stc64_t rng = stc64_init(1234);
stc64_uniformf_t dist = stc64_uniformf_init(100.0f, n);
@@ -37,6 +37,8 @@ int main() { clist_fx_clear(&list);
c_apply(v, clist_fx_push_back(&list, v), int, {10, 20, 30, 40, 30, 50});
+ const double* v = clist_fx_get(&list, 30);
+ printf("found: %f\n", *v);
c_foreach (i, clist_fx, list) printf(" %g", *i.ref);
puts("");
|
