- 536 名前:デフォルトの名無しさん [2007/10/29(月) 15:26:38 ]
- >>533
opはオペレーションNoの取得なので、1文字です。 指定文字列の取得はchar str[100]に入れています。 >scanf("%s", str); >>535 1文字入力の%cで >scanf("%c", &op); と変えてみました。 キューには格納されているようですが、変な出力結果になってしまいます。 実行結果 Operation(0:enqueue 2:quit)0 input string : ab String Queue : [ab] head[0] tail[1] Operation(0:enqueue 2:quit)invalid ope number! head[0] tail[1] Operation(0:enqueue 2:quit)0 input string : bc String Queue : [ab] [bc] head[0] tail[2] Operation(0:enqueue 2:quit)invalid ope number! head[0] tail[2] Operation(0:enqueue 2:quit)
|

|