課題7-2(下記に記載)で作成したリストで表現されたスタックに対して、pushを行う関数 を作成せよ。push関数を呼び出す前と後でprint_stack_listを呼びだし、push関数が正常に動いている ことを確認せよ。 (ヒント)push関数のプロトタイプ宣言はvoid push(struct data **top, char key);のようにする。 (課題7ー2) #include<stdio.h> #include<string.h> #include<stdlib.h> struct data{ char key; struct data *next; }; void print_stack_list(struct data *top); int main() { struct data *top, *cur; char values[4] = {'a', 'b', 'c', 'd'}; int i; top = NULL; for (i = 0; i < 4; i++) { cur = (struct data*)malloc(sizeof(struct data)); if (cur == NULL) { printf("メモりが確保できませんでした。\n"); return 1; } cur->key = values[i]; cur->next = top; top = cur; } print_stack_list(top); return 0; } void print_stack_list(struct data *top) { while (top != NULL) { printf("%c\n",top->key); top = top->next; } }
Standard input is empty
prog.cpp:1: error: stray ‘\350’ in program prog.cpp:1: error: stray ‘\252’ in program prog.cpp:1: error: stray ‘\262’ in program prog.cpp:1: error: stray ‘\351’ in program prog.cpp:1: error: stray ‘\241’ in program prog.cpp:1: error: stray ‘\214’ in program prog.cpp:1: error: stray ‘\357’ in program prog.cpp:1: error: stray ‘\274’ in program prog.cpp:1: error: stray ‘\210’ in program prog.cpp:1: error: stray ‘\344’ in program prog.cpp:1: error: stray ‘\270’ in program prog.cpp:1: error: stray ‘\213’ in program prog.cpp:1: error: stray ‘\350’ in program prog.cpp:1: error: stray ‘\250’ in program prog.cpp:1: error: stray ‘\230’ in program prog.cpp:1: error: stray ‘\343’ in program prog.cpp:1: error: stray ‘\201’ in program prog.cpp:1: error: stray ‘\253’ in program prog.cpp:1: error: stray ‘\350’ in program prog.cpp:1: error: stray ‘\250’ in program prog.cpp:1: error: stray ‘\230’ in program prog.cpp:1: error: stray ‘\350’ in program prog.cpp:1: error: stray ‘\274’ in program prog.cpp:1: error: stray ‘\211’ in program prog.cpp:1: error: stray ‘\357’ in program prog.cpp:1: error: stray ‘\274’ in program prog.cpp:1: error: stray ‘\211’ in program prog.cpp:1: error: stray ‘\343’ in program prog.cpp:1: error: stray ‘\201’ in program prog.cpp:1: error: stray ‘\247’ in program prog.cpp:1: error: stray ‘\344’ in program prog.cpp:1: error: stray ‘\275’ in program prog.cpp:1: error: stray ‘\234’ in program prog.cpp:1: error: stray ‘\346’ in program prog.cpp:1: error: stray ‘\210’ in program prog.cpp:1: error: stray ‘\220’ in program prog.cpp:1: error: stray ‘\343’ in program prog.cpp:1: error: stray ‘\201’ in program prog.cpp:1: error: stray ‘\227’ in program prog.cpp:1: error: stray ‘\343’ in program prog.cpp:1: error: stray ‘\201’ in program prog.cpp:1: error: stray ‘\237’ in program prog.cpp:1: error: stray ‘\343’ in program prog.cpp:1: error: stray ‘\203’ in program prog.cpp:1: error: stray ‘\252’ in program prog.cpp:1: error: stray ‘\343’ in program prog.cpp:1: error: stray ‘\202’ in program prog.cpp:1: error: stray ‘\271’ in program prog.cpp:1: error: stray ‘\343’ in program prog.cpp:1: error: stray ‘\203’ in program prog.cpp:1: error: stray ‘\210’ in program prog.cpp:1: error: stray ‘\343’ in program prog.cpp:1: error: stray ‘\201’ in program prog.cpp:1: error: stray ‘\247’ in program prog.cpp:1: error: stray ‘\350’ in program prog.cpp:1: error: stray ‘\241’ in program prog.cpp:1: error: stray ‘\250’ in program prog.cpp:1: error: stray ‘\347’ in program prog.cpp:1: error: stray ‘\217’ in program prog.cpp:1: error: stray ‘\276’ in program prog.cpp:1: error: stray ‘\343’ in program prog.cpp:1: error: stray ‘\201’ in program prog.cpp:1: error: stray ‘\225’ in program prog.cpp:1: error: stray ‘\343’ in program prog.cpp:1: error: stray ‘\202’ in program prog.cpp:1: error: stray ‘\214’ in program prog.cpp:1: error: stray ‘\343’ in program prog.cpp:1: error: stray ‘\201’ in program prog.cpp:1: error: stray ‘\237’ in program prog.cpp:1: error: stray ‘\343’ in program prog.cpp:1: error: stray ‘\202’ in program prog.cpp:1: error: stray ‘\271’ in program prog.cpp:1: error: stray ‘\343’ in program prog.cpp:1: error: stray ‘\202’ in program prog.cpp:1: error: stray ‘\277’ in program prog.cpp:1: error: stray ‘\343’ in program prog.cpp:1: error: stray ‘\203’ in program prog.cpp:1: error: stray ‘\203’ in program prog.cpp:1: error: stray ‘\343’ in program prog.cpp:1: error: stray ‘\202’ in program prog.cpp:1: error: stray ‘\257’ in program prog.cpp:1: error: stray ‘\343’ in program prog.cpp:1: error: stray ‘\201’ in program prog.cpp:1: error: stray ‘\253’ in program prog.cpp:1: error: stray ‘\345’ in program prog.cpp:1: error: stray ‘\257’ in program prog.cpp:1: error: stray ‘\276’ in program prog.cpp:1: error: stray ‘\343’ in program prog.cpp:1: error: stray ‘\201’ in program prog.cpp:1: error: stray ‘\227’ in program prog.cpp:1: error: stray ‘\343’ in program prog.cpp:1: error: stray ‘\201’ in program prog.cpp:1: error: stray ‘\246’ in program prog.cpp:1: error: stray ‘\343’ in program prog.cpp:1: error: stray ‘\200’ in program prog.cpp:1: error: stray ‘\201’ in program prog.cpp:1: error: stray ‘\343’ in program prog.cpp:1: error: stray ‘\202’ in program prog.cpp:1: error: stray ‘\222’ in program prog.cpp:1: error: stray ‘\350’ in program prog.cpp:1: error: stray ‘\241’ in program prog.cpp:1: error: stray ‘\214’ in program prog.cpp:1: error: stray ‘\343’ in program prog.cpp:1: error: stray ‘\201’ in program prog.cpp:1: error: stray ‘\206’ in program prog.cpp:1: error: stray ‘\351’ in program prog.cpp:1: error: stray ‘\226’ in program prog.cpp:1: error: stray ‘\242’ in program prog.cpp:1: error: stray ‘\346’ in program prog.cpp:1: error: stray ‘\225’ in program prog.cpp:1: error: stray ‘\260’ in program prog.cpp:2: error: stray ‘\343’ in program prog.cpp:2: error: stray ‘\202’ in program prog.cpp:2: error: stray ‘\222’ in program prog.cpp:2: error: stray ‘\344’ in program prog.cpp:2: error: stray ‘\275’ in program prog.cpp:2: error: stray ‘\234’ in program prog.cpp:2: error: stray ‘\346’ in program prog.cpp:2: error: stray ‘\210’ in program prog.cpp:2: error: stray ‘\220’ in program prog.cpp:2: error: stray ‘\343’ in program prog.cpp:2: error: stray ‘\201’ in program prog.cpp:2: error: stray ‘\233’ in program prog.cpp:2: error: stray ‘\343’ in program prog.cpp:2: error: stray ‘\202’ in program prog.cpp:2: error: stray ‘\210’ in program prog.cpp:2: error: stray ‘\343’ in program prog.cpp:2: error: stray ‘\200’ in program prog.cpp:2: error: stray ‘\202’ in program prog.cpp:2: error: stray ‘\351’ in program prog.cpp:2: error: stray ‘\226’ in program prog.cpp:2: error: stray ‘\242’ in program prog.cpp:2: error: stray ‘\346’ in program prog.cpp:2: error: stray ‘\225’ in program prog.cpp:2: error: stray ‘\260’ in program prog.cpp:2: error: stray ‘\343’ in program prog.cpp:2: error: stray ‘\202’ in program prog.cpp:2: error: stray ‘\222’ in program prog.cpp:2: error: stray ‘\345’ in program prog.cpp:2: error: stray ‘\221’ in program prog.cpp:2: error: stray ‘\274’ in program prog.cpp:2: error: stray ‘\343’ in program prog.cpp:2: error: stray ‘\201’ in program prog.cpp:2: error: stray ‘\263’ in program prog.cpp:2: error: stray ‘\345’ in program prog.cpp:2: error: stray ‘\207’ in program prog.cpp:2: error: stray ‘\272’ in program prog.cpp:2: error: stray ‘\343’ in program prog.cpp:2: error: stray ‘\201’ in program prog.cpp:2: error: stray ‘\231’ in program prog.cpp:2: error: stray ‘\345’ in program prog.cpp:2: error: stray ‘\211’ in program prog.cpp:2: error: stray ‘\215’ in program prog.cpp:2: error: stray ‘\343’ in program prog.cpp:2: error: stray ‘\201’ in program prog.cpp:2: error: stray ‘\250’ in program prog.cpp:2: error: stray ‘\345’ in program prog.cpp:2: error: stray ‘\276’ in program prog.cpp:2: error: stray ‘\214’ in program prog.cpp:2: error: stray ‘\343’ in program prog.cpp:2: error: stray ‘\201’ in program prog.cpp:2: error: stray ‘\247’ in program prog.cpp:2: error: stray ‘\343’ in program prog.cpp:2: error: stray ‘\202’ in program prog.cpp:2: error: stray ‘\222’ in program prog.cpp:2: error: stray ‘\345’ in program prog.cpp:2: error: stray ‘\221’ in program prog.cpp:2: error: stray ‘\274’ in program prog.cpp:2: error: stray ‘\343’ in program prog.cpp:2: error: stray ‘\201’ in program prog.cpp:2: error: stray ‘\263’ in program prog.cpp:2: error: stray ‘\343’ in program prog.cpp:2: error: stray ‘\201’ in program prog.cpp:2: error: stray ‘\240’ in program prog.cpp:2: error: stray ‘\343’ in program prog.cpp:2: error: stray ‘\201’ in program prog.cpp:2: error: stray ‘\227’ in program prog.cpp:2: error: stray ‘\343’ in program prog.cpp:2: error: stray ‘\200’ in program prog.cpp:2: error: stray ‘\201’ in program prog.cpp:2: error: stray ‘\351’ in program prog.cpp:2: error: stray ‘\226’ in program prog.cpp:2: error: stray ‘\242’ in program prog.cpp:2: error: stray ‘\346’ in program prog.cpp:2: error: stray ‘\225’ in program prog.cpp:2: error: stray ‘\260’ in program prog.cpp:2: error: stray ‘\343’ in program prog.cpp:2: error: stray ‘\201’ in program prog.cpp:2: error: stray ‘\214’ in program prog.cpp:2: error: stray ‘\346’ in program prog.cpp:2: error: stray ‘\255’ in program prog.cpp:2: error: stray ‘\243’ in program prog.cpp:2: error: stray ‘\345’ in program prog.cpp:2: error: stray ‘\270’ in program prog.cpp:2: error: stray ‘\270’ in program prog.cpp:2: error: stray ‘\343’ in program prog.cpp:2: error: stray ‘\201’ in program prog.cpp:2: error: stray ‘\253’ in program prog.cpp:2: error: stray ‘\345’ in program prog.cpp:2: error: stray ‘\213’ in program prog.cpp:2: error: stray ‘\225’ in program prog.cpp:2: error: stray ‘\343’ in program prog.cpp:2: error: stray ‘\201’ in program prog.cpp:2: error: stray ‘\204’ in program prog.cpp:2: error: stray ‘\343’ in program prog.cpp:2: error: stray ‘\201’ in program prog.cpp:2: error: stray ‘\246’ in program prog.cpp:2: error: stray ‘\343’ in program prog.cpp:2: error: stray ‘\201’ in program prog.cpp:2: error: stray ‘\204’ in program prog.cpp:2: error: stray ‘\343’ in program prog.cpp:2: error: stray ‘\202’ in program prog.cpp:2: error: stray ‘\213’ in program prog.cpp:3: error: stray ‘\343’ in program prog.cpp:3: error: stray ‘\201’ in program prog.cpp:3: error: stray ‘\223’ in program prog.cpp:3: error: stray ‘\343’ in program prog.cpp:3: error: stray ‘\201’ in program prog.cpp:3: error: stray ‘\250’ in program prog.cpp:3: error: stray ‘\343’ in program prog.cpp:3: error: stray ‘\202’ in program prog.cpp:3: error: stray ‘\222’ in program prog.cpp:3: error: stray ‘\347’ in program prog.cpp:3: error: stray ‘\242’ in program prog.cpp:3: error: stray ‘\272’ in program prog.cpp:3: error: stray ‘\350’ in program prog.cpp:3: error: stray ‘\252’ in program prog.cpp:3: error: stray ‘\215’ in program prog.cpp:3: error: stray ‘\343’ in program prog.cpp:3: error: stray ‘\201’ in program prog.cpp:3: error: stray ‘\233’ in program prog.cpp:3: error: stray ‘\343’ in program prog.cpp:3: error: stray ‘\202’ in program prog.cpp:3: error: stray ‘\210’ in program prog.cpp:3: error: stray ‘\343’ in program prog.cpp:3: error: stray ‘\200’ in program prog.cpp:3: error: stray ‘\202’ in program prog.cpp:4: error: stray ‘\357’ in program prog.cpp:4: error: stray ‘\274’ in program prog.cpp:4: error: stray ‘\210’ in program prog.cpp:4: error: stray ‘\343’ in program prog.cpp:4: error: stray ‘\203’ in program prog.cpp:4: error: stray ‘\222’ in program prog.cpp:4: error: stray ‘\343’ in program prog.cpp:4: error: stray ‘\203’ in program prog.cpp:4: error: stray ‘\263’ in program prog.cpp:4: error: stray ‘\343’ in program prog.cpp:4: error: stray ‘\203’ in program prog.cpp:4: error: stray ‘\210’ in program prog.cpp:4: error: stray ‘\357’ in program prog.cpp:4: error: stray ‘\274’ in program prog.cpp:4: error: stray ‘\211’ in program prog.cpp:4: error: stray ‘\351’ in program prog.cpp:4: error: stray ‘\226’ in program prog.cpp:4: error: stray ‘\242’ in program prog.cpp:4: error: stray ‘\346’ in program prog.cpp:4: error: stray ‘\225’ in program prog.cpp:4: error: stray ‘\260’ in program prog.cpp:4: error: stray ‘\343’ in program prog.cpp:4: error: stray ‘\201’ in program prog.cpp:4: error: stray ‘\256’ in program prog.cpp:4: error: stray ‘\343’ in program prog.cpp:4: error: stray ‘\203’ in program prog.cpp:4: error: stray ‘\227’ in program prog.cpp:4: error: stray ‘\343’ in program prog.cpp:4: error: stray ‘\203’ in program prog.cpp:4: error: stray ‘\255’ in program prog.cpp:4: error: stray ‘\343’ in program prog.cpp:4: error: stray ‘\203’ in program prog.cpp:4: error: stray ‘\210’ in program prog.cpp:4: error: stray ‘\343’ in program prog.cpp:4: error: stray ‘\202’ in program prog.cpp:4: error: stray ‘\277’ in program prog.cpp:4: error: stray ‘\343’ in program prog.cpp:4: error: stray ‘\202’ in program prog.cpp:4: error: stray ‘\244’ in program prog.cpp:4: error: stray ‘\343’ in program prog.cpp:4: error: stray ‘\203’ in program prog.cpp:4: error: stray ‘\227’ in program prog.cpp:4: error: stray ‘\345’ in program prog.cpp:4: error: stray ‘\256’ in program prog.cpp:4: error: stray ‘\243’ in program prog.cpp:4: error: stray ‘\350’ in program prog.cpp:4: error: stray ‘\250’ in program prog.cpp:4: error: stray ‘\200’ in program prog.cpp:4: error: stray ‘\343’ in program prog.cpp:4: error: stray ‘\201’ in program prog.cpp:4: error: stray ‘\257’ in program prog.cpp:4: error: stray ‘\343’ in program prog.cpp:4: error: stray ‘\201’ in program prog.cpp:4: error: stray ‘\256’ in program prog.cpp:4: error: stray ‘\343’ in program prog.cpp:4: error: stray ‘\202’ in program prog.cpp:4: error: stray ‘\210’ in program prog.cpp:4: error: stray ‘\343’ in program prog.cpp:4: error: stray ‘\201’ in program prog.cpp:4: error: stray ‘\206’ in program prog.cpp:4: error: stray ‘\343’ in program prog.cpp:4: error: stray ‘\201’ in program prog.cpp:4: error: stray ‘\253’ in program prog.cpp:4: error: stray ‘\343’ in program prog.cpp:4: error: stray ‘\201’ in program prog.cpp:4: error: stray ‘\231’ in program prog.cpp:4: error: stray ‘\343’ in program prog.cpp:4: error: stray ‘\202’ in program prog.cpp:4: error: stray ‘\213’ in program prog.cpp:4: error: stray ‘\343’ in program prog.cpp:4: error: stray ‘\200’ in program prog.cpp:4: error: stray ‘\202’ in program prog.cpp:5: error: stray ‘\357’ in program prog.cpp:5: error: stray ‘\274’ in program prog.cpp:5: error: stray ‘\210’ in program prog.cpp:5: error: stray ‘\350’ in program prog.cpp:5: error: stray ‘\252’ in program prog.cpp:5: error: stray ‘\262’ in program prog.cpp:5: error: stray ‘\351’ in program prog.cpp:5: error: stray ‘\241’ in program prog.cpp:5: error: stray ‘\214’ in program prog.cpp:5: error: stray ‘\343’ in program prog.cpp:5: error: stray ‘\203’ in program prog.cpp:5: error: stray ‘\274’ in program prog.cpp:5: error: stray ‘\357’ in program prog.cpp:5: error: stray ‘\274’ in program prog.cpp:5: error: stray ‘\211’ in program prog.cpp:1: error: expected unqualified-id before numeric constant prog.cpp:5: error: expected unqualified-id before numeric constant
Standard output is empty