2017.6.11 CS50 week 2 筆記
紀錄時間: 0857~0930,1410~1612
provoke 煽動、挑釁、誘導
- 大概記住Error發生的原因
- eprintf 打印錯誤訊息
- 在line旁邊加紅點,停住程式,觀察哪邊有bug
verbal 口頭上的
- rubber duck,解釋錯誤給他聽
indent 縮排、訂契約、成鋸齒狀
syllabus 教學大綱
clause 條款
clause 條款
punitive 懲罰的
take the edge off 使緩和(情緒...)、消除緊張
exclamation 喊叫、感嘆、感嘆句
exclamation point 驚嘆號
- 在程式加入註解
- 注意變數是甚麼屬性,比如int, string etc.
- C中的字母有號碼(Ascii code),A = 65,B = 66 so on...,小寫a = 97, b = 98 so on...彼此相差32
- 利用library簡化程式
- C儲存字串時,會附加存上\0,代表字串結束
under the hood 揭開遮蓋物、看看事實真相
- 搞清楚電腦儲存資料的方式就能更好的操控電腦
- 從command line輸入的資料會存在一個argument vector裡,可以算argument vector的資料數用"argc"= argument vector count,vector 名稱叫 "argv" = argument vector
- int main (void),int代表,如果程式成功執行,main會回傳"0"(不是1),打上return代表要讓main回傳的數字
留言
張貼留言