diff options
| author | _Tradam <[email protected]> | 2023-09-08 01:29:47 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-09-08 01:29:47 +0000 |
| commit | 3c76c7f3d5db3f9586a90d03f8fbb02d79de9acd (patch) | |
| tree | afbe4b540967223911f7c5de36559b82154f02f3 /misc/examples/new_pque.c | |
| parent | 0841165881871ee01b782129be681209aeed2423 (diff) | |
| parent | 1a72205fe05c2375cfd380dd8381a8460d9ed8d1 (diff) | |
| download | STC-modified-modified.tar.gz STC-modified-modified.zip | |
Diffstat (limited to 'misc/examples/new_pque.c')
| -rw-r--r-- | misc/examples/new_pque.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/misc/examples/new_pque.c b/misc/examples/new_pque.c deleted file mode 100644 index 9147e3f2..00000000 --- a/misc/examples/new_pque.c +++ /dev/null @@ -1,22 +0,0 @@ -#include <stdio.h> - -struct Point { int x, y; } typedef Point; - -#define i_type PointQ -#define i_val Point -#define i_less(a, b) a->x < b->x || (a->x == b->x && a->y < b->y) -#include <stc/cpque.h> - - -int main() -{ - PointQ pque = c_make(PointQ, {{23, 80}, {12, 32}, {54, 74}, {12, 62}}); - // print - for (; !PointQ_empty(&pque); PointQ_pop(&pque)) - { - const Point *v = PointQ_top(&pque); - printf(" (%d,%d)", v->x, v->y); - } - puts(""); - PointQ_drop(&pque); -} |
