So far, the input and output we have discussed is the object of the system-specified standard device (the input device is the keyboard and the output device is the monitor). In real-world applications, disk files are often used as objects. The data
. Net memory recycling and Dispose, Close, Finalize MethodsI. net objects are generally used in three situations ﹕1. Create an object2. Objects used3. Release objects2. Create an object1. There are two steps to create an object: variable type
C # Memory recycling and Dispose, Close, Finalize method [convert] From: http://blog.csdn.net/xykwgjyygy/archive/2008/01/11/2037741.aspx
. Net memory recycling and Dispose, Close, Finalize Methods
I. net objects are generally used in three
C-based file operations
In ANSI C, the operation of the file is divided into two ways, that is, streaming file operations and I/O file operations, respectively, described below.
One, streaming file operation
The file operations in this way have an
Fgets (read a string from the file)Related functions: open, fread, fscanf, GETCHeader file include Define the function char * fgets (char * s, int size, file * stream );Function Description: fgets () is used to read characters from the file referred
In C, file operations are done by the library function, which describes the opening and closing of files.
File open (fopen function)
The fopen () function is used to open a file whose prototype is:
FILE *fopen (Char *filename, char *mode);
In the programming process, file operations are a common problem. In C ++ builder, you can use multiple methods to operate files, I will introduce this in detail in the following parts:
1. C-based file operations;
2. File Operations Based on C ++;
1. c # The TabControl control in it does not have a close button, and it is ugly.
2. There are some third-party controls that are ready for use, but they are charged.
3. Because my fault tree inference and diagnosis project allows multiple documents
1
C file operations
FileBasic concepts of FilesThe so-called "file" refers to an ordered set of related data. This dataset has a name called a file name. In fact, we have used files many times in the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.