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

単連結リストの整列 #25 名前とスコアが要素のリストを使ってみる

C

サンプルコードを書いてsclistを使ってみる。 test_sclist.c #include <stdio.h> #include <string.h> #include "sclist.h" #define UNUSED_ARG(x) (void)(x) static sclist_t make(void) { struct { char *n; int s; } *p, d[] = { {"Amelia", 6}, {"Barbara", 4}, {"Charlotte</string.h></stdio.h>…