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

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