看板 C_and_CPP 關於我們 聯絡資訊
※ 引述《Hazukashiine (私は幸せです)》之銘言: : ※ 引述《wtchen (沒有存在感的人)》之銘言: : : 目前想新增一些東西,希望板友能夠提出一些idea。 : : 目前板工想到的有: : : - 空指標 (把之前寫的補充一下) : : - call by value / call by reference的謬誤 : : - C/C++ 轉型的差異(const, void*) : : - lvalue & rvalue : : 有其他想法請踴躍提供,感謝。 : 我覺得一些容易犯的 undefined behavior 也蠻重要的 : 尤其是 strict aliasing / type punning 這方面的東西 : 還有希望可以新增一些像是 coding convention 的東西 : 雖然好像不像其他那麼有強制性 但是對初心者來說好像更重要一點 : 畢竟寫好程式從好習慣開始(? Google C++ Style 是蠻好的指南(灌下去可能不只13誡了XDDD) https://google.github.io/styleguide/cppguide.html 尤其在 "Static and Global Variables" 剛好個人 最近也踩到雷,還花了不少時間 debug http://tinyurl.com/hcqfc9x -- 各種雜七雜八的心得與無病呻吟 http://goodspeedlee.blogspot.tw/ -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 220.136.59.203 ※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1476821805.A.47F.html
wtchen: ....灌下去變成100誡? 10/19 15:15
wtchen: 不過可以放到參考資料裡就是 10/19 15:18
wtchen: 一般都只看過C++的code style, 好像沒有C的 10/19 15:27
wtchen: C的只有像Linus教派那種 10/19 15:28
wtchen: 除了google還有哪邊有好的code style? 10/19 15:58
Caesar08: iso c++有他們的style 10/19 19:05
wtchen: https://isocpp.org/wiki/faq/coding-standards 這個? 10/19 19:12
askacis: GUN C code style 10/19 19:37
Caesar08: isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines 10/19 20:32
wtchen: 乾脆全部蒐集起來放精華區 10/19 20:37