_close, close

_close, close是一個函式。

函式名: _close, close

程式例:

#include

#include

#include

#include

main()

{

int handle;

char buf[11] = "0123456789";

/* create a file containing 10 bytes */

handle = open("NEW.FIL", O_CREAT);

if (handle > -1)

{

write(handle, buf, strlen(buf));

/* close the file */

close(handle);

}

else

{

printf("Error opening file\n");

}

return 0;

}

相關詞條

相關搜尋

熱門詞條

聯絡我們