2011-12-16から1日間の記事一覧

/

int main(){ //struct item linearList = {0, NULL}; //struct item linearList; //linearList.id = 0; //linearList.next = NULL; //struct item aa = {1, NULL}; //struct item aa; //aa.id = 1; //aa.next = NULL; item_t linearList; linearList.id = 0;…

構造体での中身代入時になぜかエラー

C++ C

#include typedef struct item{ int id; struct item * next; }item_t;void add(struct item * ori, struct item * tar); /* oh, my god, I spend 1 hours, why the hell, item_t linearList; linearList.id = 0; item_t aa; aa.id = 1; throws compile erro…