經過上一篇新增節點的內容,我們可以知道目前List中總共有4個節點。今天我們想把其中一個節點刪除掉,我們得先輸入我們想刪除的節點的數值,並搜尋List中有沒有哪一個節點的data跟我們輸入的數值一樣,若有,就是要刪除那個節點,若沒有,就不做刪除的動作。
接下來是記錄List插入節點的,總共有三種期況,分別是將一個節點插入List的最前面、在List中間插入節點、將節點插入List的最後面。
最近遇到的考題,就是有關結構在節點的運用,結果我結構不太熟,直接寫錯,所以,上一篇簡單介紹了結構在幹嘛,這篇就直接進入結構在List中的運用,另外,也筆記一下我在網路上看到有關介紹List的內容。
這邊先介紹一下List是由誰所構成的,List是由好幾個節點所構成的,每個節點有自身存取的數值、一個指向下一個節點位址的指標,就是用這樣一個串一個的方式構成一個List。
最近有遇到結構的考題,發現自己真的不太熟這個工具,所以,用此篇來筆記一下最近複習結構的內容。
最後,是重寫一下我遇到的那個考題,其實,題目介紹我有點忘記了==,依稀記得的是它有創一個List的struct,並希望我將List中最後一個節點換成這個List的第一個節點的樣子。 真的有點忘記了== 沒關係,就依照我記得的樣子再來寫一次這個題目吧。
第二章的內容,總算讀到告一個段落,總覺得是一個惡意滿滿的章節 加上 考驗你對繞口令的理解力,哈哈哈。
接下來,就是我覺得第二章萬惡的根源const限定詞,哈哈哈。
接下來,介紹void*指標,我一開始學有關void這個詞大多是說代表無意義的意思,如果,將void放在一個函式的回傳的位置,就代表該函式沒有要回傳的值,壓根都沒想到它還可以在宣告指標的時候…
接下來進入第三章囉~~~