Comparison between char and INT in atoi Conversion

Source: Internet
Author: User

Uchar recordlenth

When comparing recordlenth with integer int, you do not need to convert atoi to recordlenth. If conversion fails

 

 

3. lseek Function
Required header file: # include <unistd. h>
# Include <sys/types. h>/* defines off_t, pid_t, and Other types */

Function prototype: off_t lseek (int fd, off_t offset, int whence)

FD: file descriptor
Offset: Offset. The value can be positive or negative. The positive value is backward and the negative value is forward.

Whence: There are three parameters.
(1). seek_set: the current position starts with the file, and the new position is the offset size.
(2). seek_cur: The current position is the file pointer position, and the new position is the current position plus the offset size.
(3). seek_end: The current position is the end of the file, and the new position is the offset size.

Returned value: Successful: current file displacement
Failed:-1

O_append means that the flag is moved to the end of the file before each write. You cannot start with an o_append file unless you read the content of the file before writing, and then merge the content you want to write and read from the file, and then write it into the file. This can be achieved! O_append means that the flag is moved to the end of the file before each write. You cannot start with an o_append file unless you read the content of the file before writing, and then merge the content you want to write and read from the file, and then write it into the file. This can be achieved!

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.