文件分類 [總覽]
社群資訊
NARUTO的Ex03範例程式碼 ( C 程式期中評量)
(naruto, naruto@hotmail.com, 2011-07-09 16:46)
1樓
這是一個簡單的命令列結合檔案I/O與字串應用的程式,
雖然程式並不難,但一些小細節還是不要忘記喔!
例如命令列的檢查,檔案開啟成功與否的檢查等等,
這些東西還是不要省略比較好喔。
同樣地,註解寫了很多,一起來看看吧!
原始碼:http://pastie.org/2186969
測試用的文字檔:http://pastie.org/2186976
你可以如下測試:./ex_03 smb test.txt
應該會跑出如下的結果:
The smb.conf file uses the same syntax as the various old .ini files in Windows 3.1:
Each section in the smb.conf file represents either a share or a meta-service on the Samba server.
The printers stanza in the smb.conf file can be set as not browseable.
Each section of the smb.conf file that specifies a share, or a meta-service, is called a stanza.
The global stanza specifies settings that affect all the other stanzas in the smb.conf file.
Configuration parameters are documented in the smb.conf man page.