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