《linux c 編程實戰 》 -我的錯誤修正筆記

來源:互聯網
上載者:User

標籤:

一切僅作為參考,歡迎任何人討論

 

  [頁數] 151     [位置] my_rwl.c [類型]  代碼錯誤     

       [描述]   從書上看 __LINE__,是一個底線,但實際上內建宏是前後各兩個下滑線組成的,即 _ _LINE_ _

  [頁數] 195     [位置] studyuid.c [類型]  代碼錯誤     

       [描述]   strerror()的標頭檔是string.h ,需要添加之後才能代碼才能運行

  [頁數] 251    [位置] ctrlpocess.c [類型]  代碼錯誤     

       [描述]   read 的函式宣告 :ssize_t read(int fd, void *buf, size_t count),而 stdin 的聲明是extern FILE *stdin,因此 read(stdin,buf,1024)不匹配,改成read(0,buf,1024)

   [頁數] 299   [位置] 中部         [類型]  描述偏差          PS :待討論

       [描述]   int select(int nfds, fd_set *readfds, fd_set *writefds,fd_set *exceptfds, struct timeval *timeout);

                  對nfds 是這麼解釋的 :需要監視的檔案描述符數,man之後的解釋是

                  nfds is the highest-numbered file descriptor in any of the three sets【 在所有的檔案描述符中最高值的大小】

                  使用建議:取最大的檔案描述符加一

 

《linux c 編程實戰 》 -我的錯誤修正筆記

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.