= is the assignment operator in C language and C++. It is used for assignment of variables, arrays, etc. The operation direction is from right to left, such as:
#include<iostream>usingnamespacestd;intmain(){inta=10;//Define variable a, and assign 10 as the initialization value to aintb;b=a;//Assign the value of a to breturn0;}
The characteristic of the assignment operator is that it operates from right to left. You can re-understand the assignment operator through comments. From today on, we will change our previous view of =. It is not equal to mathematics, but assignment, and the correct reading is also Reading from right to left, if b=a should be read as assigning a to b.
Please understand and digest it!