2012-05-23から1日間の記事一覧

単連結リストの整列 #18 文字列を整列する

C

ナル文字終端な文字列をデータとして持つ要素についての整列を行ってみる。 #include <stdio.h> #include <string.h> #include "lsort.h" #define UNUSED_ARG(x) (void)(x) typedef struct tag_snode snode_t; struct tag_snode { snode_t *next; char *val; }; static int sup(</string.h></stdio.h>…