
C語(yǔ)言中從文件中獲取字符串函數(shù)
The fgets() function returns a line from an open file. 函數(shù)的作用是:從文件指針中讀取一行。
The fgets() function is used to read a single line from a file. 函數(shù)用來(lái)讀取文件中的一行內(nèi)容。
Timed_out (bool) - TRUE if the stream timed out while waiting for data on the last call to fread() or fgets(). timed_out(bool)-如果在上次調(diào)用fread()或者fgets()中等待數(shù)據(jù)時(shí)流超時(shí)了則為TRUE。
The fgets() function stops returning on a new line, at the specified length, or at EOF, whichever comes first. 函數(shù)可以對(duì)是否輸出新的一行詞段作出設(shè)置,具體見(jiàn)下面的語(yǔ)法;當(dāng)?shù)竭_(dá)文檔段落末尾[EOF]時(shí),該函數(shù)將停止運(yùn)行。
fgets( file_name_mktemp, FILEPATH_MAXc語(yǔ)言, stdin); "請(qǐng)輸入臨時(shí)文件名:");