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

構造体のメンバの初期化

C

明解C言語 入門編 > 12. 構造体 > 構造体のメンバの初期化 C #include <stdio.h> #include <string.h>struct gstudent { char name[20]; int height; float weight; };int main(int argc, char* argv[]) { struct gstudent sanaka = {"Sanaka", 175, 60.5}; printf("氏名:%s\n</string.h></stdio.h>…