C ++ Primer (2) of reading notes

xiaoxiao2021-03-06  100

Built-in data type, int, float, char, boolean (false / true) extended basic data type, String, Complex Number, Vector, List; object definition, expression, C action, declaration, assignment, calculation, input , Output, etc., express by one or more formulations; the statement, the expression ended at the end of the semicolon; the function is defined and used, the function is a resolution problem constituted by the statement; the function is divided into four parts: return Type, function name, parameter table, function body

The programming process, pre-processing,

input Output,

Get:

1) Solve complex problems, open this problem, divide them, ancient come; for each problem, it can be disassembled, algorithm, data; 2) For example, my solution: Data: Data: Data: Each sale Book name and publishing agency, in time sorting; two-week demand: sales of each book, sales of each publishing house; sort by the first letter named

Step 1: Data processing, problem first, the same merger will be the same as the number of books, and the number is added; the problem is sorted; the problem is three, the number of books, the number of books; the second step: algorithm implementation , Problem A, question one and the two of the previous efficiency; problem B, how to merge; problem one, three middle; problem C, sort;

Comparison: I lack the process of reading the file, output the file; I have no problem in the book, the secondary efficiency problem; (should be sorted by the publishing house, then the merged book is relatively simple)

3) After the file suffix: Note: Carythrics and lowercase C are the same in DOS; (? Size) suffix: .h; .c; .cxx; .cpp; Different implementation of C It is different, and the specific situation requires the user guide for the compiler; (further understanding)

4) Compilation: Compilation contains two processes, one, check error; II, generate code; error-changing is divided into syntax errors and type errors; this process is equivalent, we talk to the computer, the error is that the computer did not understand our words. And I didn't understand the reason, one for our grammar errors, two for common sense mistakes, such as telling the decimal to integers; generating code is equivalent to the understanding of the computer's own conversation; 5) // is required for using the header file below the String object #Include string current_chapter = "getting start"; // In order to use the header file below the vector object is required #include Vector Chapter_titles (20); Question:

1) USING indicator, 2.7 & 2.8; 2) Implicit type conversion between the built-in types 4.14;

转载请注明原文地址:https://www.9cbs.com/read-96278.html

New Post(0)