Structure I said a few things, but a separate Commission article to tell the reason is because there is a small sad little joy, not like the unexpected will be the two-level pointer of the kind of middle and sad, not like a multi-threaded kind of big sorrow exultation
If you tell someone what the variable is, for example, you will be an example of int or char, before I will int, because int familiar ah, familiar feeling is very simple, the quasi-same
The structure has long been aware of this thing, very early will be created, but has been in practice to avoid encountering, these days packaging multithreading is used to many times, familiar with is not afraid of
What is a struct--------------------------------the packaging of variables (variables can be of the same type can be different types, arrays can only be of the same type)
What is the structure of the--------------------------packaging variables---------------Since packaging, there is more than one variable, one can, no need.
Structure how to use the---------1. Pack a bunch of variables 2. In a bag or a few more bags in the bag, like in the Love apartment Luzicio the gift of apology to Mei Jia
Just an example.
I'm going to pass a char to the function. An int variable--void fun (int X,char p)
I can also use the structure to implement the above requirements struct a{int A; char b;}; --------void Fun (A *p); The pointer I passed into this struct
I can also use two structure to achieve the above requirements of struct a{int A;}; struct b{a *p;char B;}; ------void Fun (b *r); I pass in the B struct pointer, B.p.a point two times to use int variable or B->P->A to refer to two times
(The third general implementation of your multiple objects used in different B, a is the same, as I now encapsulate multi-threaded inside if you sell tickets, multiple threads sell tickets, sell a total number of tickets, but sell the window is not the same)
Now you understand what I mean by the title.
(PanPen120 original)
C + + basic structure (originally a kindergarten bag-middle school students ' schoolbags-school bags-students ' bags or suitcases)