struct ca{char c;ca *next;};void InitList(ca *L){cout<<"輸入一頁文字(以#結(jié)束)"<<endl;while((L->c=getchar())!='#'){L->next=new ca;L=L->next;}L->next=NULL;}
1 回答

翻翻過去那場雪
TA貢獻(xiàn)2065條經(jīng)驗(yàn) 獲得超14個贊
void PrintList(ca *L)
{
while (L->c != '#'&&L->next!=nullptr)
{
std::cout << L->c;
L = L->next;
}
}
- 1 回答
- 0 關(guān)注
- 623 瀏覽
添加回答
舉報(bào)
0/150
提交
取消