C++primer notes Two

Source: Internet
Author: User

Really a good book, just so little, I feel a lot of learning, of course, I am too poor level.

When using the shell or bash, there is a file redirection, that is, each time the program runs, we need to manually enter the content, and then the program output content, which can be replaced by the file. Like what

The./inpu <txt1.txt >txt2.txt is to execute the Inpu again, with the contents of the Txt1.txt input, and then write the output to Txt2.txt. Txt2.txt will be re-written.

Lenovo, Cat is the meaning of opening a file, consider adding parameters.

Cat A.txt >b.txt This is where the contents of the A.txt are written to B.txt, and can be seen as a copy

The cat a.txt >>b.txt adds a.txt content to the b.txt, adding

Cat A.txt b.txt >c.txt adds a.txt content and b.txt content to C.txt, merging.

Another Mac command, RM a.out remove A.out, rm belongs to delete, if there is a link, delete is soft link.

Also need to be reminded that in C + + input and output streams generally have buffers, cout and CIN is flush buffer, buffer generally have size, so timely refresh, otherwise the contents of the buffer will be flushed out, resulting in errors. Clog also has buffer, Cerror no buffer, so run when printing in the last line?

C++primer notes Two

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.