2010-07-07から1日間の記事一覧

5人の学生を 身長・体重で ソート (関数ポインタ)

明解C言語 入門編 > 12. 構造体 > 5人の学生を 身長・体重で ソート (関数ポインタ) C #include <stdio.h> #include <string.h>#define NINSU 5typedef struct { char name[20]; int height; float weight; } gstudent;typedef int (*compare)(gstudent*, gstudent*);int comp</string.h></stdio.h>…