First day in the first day of C ++

zhaozj2021-02-16  54

The first day of the first day of the first day 2002.10.30http: //chinagpa.com Today I finally learned the door of C , because Xiao A finally took the book "C Primer". But today I really started to start, but the second edition of the Second Edition of the old pool, the second edition of the second edition is more than the first version, but it is just a few tens of page. What is the new programming concept that I have tied today is excited, because I will have more interesting knowledge waiting for me to learn, I also know that the road is very long (of course, not only saying Grammar, semantics, but OOP ideas). I will report some knowledge I have touched, because the new contact is just about the expansion of C to C. Input and output in C , COUT (pronunciation see in), C said that these two are input and output flow. This new input and output form is very intuitive, look at the example: cin >> a; Cont << "a =" << a << Endl; is there a lot of flow? Ha ~ `Don't blame it. But a bit I want to ask what can make this input output identify what type of data? I don't know this (maybe because I have seen a little bit, I don't dare to say this. However, in fact, C is still compatible with C, that is, the printf () is still supported. Function overload and default parameters Function, here let me feel some of the complexity of C , now there is this feeling, and later? Here, the overload is from the specific opinion that we can define the same name, but its parameters are different, such as parameters. Different types, but the compiler is that the actor you are incorporated to identify the function you call. The default parameter is also better understood, that is, the parameter can be missing (defined is the default a value to implement) However, attention is that the default parameter defined here must be the rightmost. The reference is referenced, in addition to the reference concept, there is no new important concept, see the case: int A; int & b = a; Single is int & b = a; here are unexpected, how to take the address of the address? Is it the value of a value to b? Not, in fact, here is the knowledge of another study "operation Overload "(Little A seems to be seen there). Talking about the reference, the biggest important importance of the reference can be the same as the address incoming function, that is, the reference variable has changed, then the referenced variable is also changed (B) When it is changed to the real shape, then A will also become the same b.) The built-in function (the built-in function) is not good. If you read the book, you will understand (Xiao A is so stupid, Haha) Inline int Max (int A, int b); / * is inline this keyword * / dynamic allocation new delete, seems to be corresponding to Malloc Free, but in C , it is recommended to use the former representatives, what is the reason? ? Small A does not know, there is no in-depth study.

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

New Post(0)