Table of Contents
fopen_sDescriptionOpen a file for reading or writing. Function prototypebool fopen_s <voidptr&:hFile> <string:FileName> <string:Mode> Arguments
Return valueFalse if an error occurred, or true otherwise. Examplevoidptr fp // create a file handle asert <zs:fopen_s fp "C:\\test.txt" "w"> "Cannot open file!" // exit if file can't be opened string s set string "Hello!" fwrite fp s // write text to file fclose fp // close file … the output of which is written to the 'C:\test.txt' file: Hello! CommentsNone. See alsoExcept where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
|