String can judge a blank line like this
Input! = ""
A character array can be used to determine whether the first element is a null character ' \ s ', or a blank line.
arrar[0]== ' + ';
or with length strlen (char arrar) ==0
Pay special attention to the two
arrar[0]==0;
Arrar[0]==null;
Because pointing to a null pointer, the null pointer points to null,null on the VS This IDE, which represents 0, so the above is established
Null for pointers and objects, 0 for numeric values
In different systems,
Null is not always equal to 0, NULL represents only null, that is, to a non-used address, in most systems, 0 is used as an address, so there is a definition like this
#define NULL 0
This is not always the case, and the system does not use the 0 address as NULL, but instead uses a different address, so don't equate null with 0, especially in some cross-platform code, which will bring you disaster.
The namespace does not initialize the variable like static, and it is initialized by itself.
S.min= (S.min < s.sales[i]? S.min:s.sales[i]);
Cout<<s.min
The output is
To initialize the variable yourself
The variable is placed in an unnamed namespace, much like an internal static variable that is linked, but it cannot be initialized by default.
A character array and a string determine if a blank line is null and the 0 namespace variable needs to be initialized by itself