C++ dot operator & file redirection & header file "" and <>--C++ Primer notes

  1. The dot operator can only be used for objects of class type. The operand on the left must be an object of class type, the operand on the right must be a member name of that type, and the result of the operation is the member specified by the operand on the right.
  2. $ addItem <infile>outfile
    The compiled executable file addItem.exe will read data from a file named infile and write the output result into a file named outfile when executed with the above instructions.
  3. When including header files from the standard library, you should surround the header file name with <> angle brackets; for header files that are not part of the standard library, surround the header file name with quotation marks "".
  4. () The call operator is used to call a function, it is a pair of parentheses, and the argument list is placed inside

Guess you like

Origin blog.csdn.net/weixin_49035356/article/details/111612528