contributed by <lum1nar>
問題簡記
鏈結串列的設計
最初修改 queue.c 時,依循著先前學習鏈結串列的風格,很快就碰上了麻煩。其中,最感到疑惑的是內嵌於其他結構體的 list_head 爲何沒有宣告爲指標?
鏈結串列普遍結構如下, 如果不使用指標,結構體本身會陷入無限循環,無法確認大小。
struct node
{
Are you sure to leave this team?
Once you delete your team, all team notes will be deleted and cannot be recovered. Please ensure you've exported or transfered these notes.
Enter team name before deleting it:
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up