C/C++の宿題片付けます 153代目at TECH
C/C++の宿題片付けます 153代目 - 暇つぶし2ch534:528
11/11/22 20:55:47.56
課題2 解答例
struct cell *makeNullList(void)
{
struct cell *list;

list = (struct cell*)malloc(sizeof(struct cell));
if (list == (struct cell*)NULL) {
fprintf(stderr, "makeNullList: can not allocate memory for new list.\n");
exit(1);
}

list->next = (struct cell*)NULL;

return list;
}

課題3 解答例
struct cell *nextCell(struct cell *target, struct cell *list)
{
struct cell *next = (struct cell*)NULL;

if (target != (struct cell*)NULL) {
next = target->next;
}

return next;
}


次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch