Math in C language. h has a function: Double POW (double N, double M); Calculate math of C language to the power of M of N. h has a function: Double SQRT (double N); Calculate the value of the root number N (start n). The string in C: char * name = "ZH"; used for output
Placeholder: % sNslog (@ "% s", name); nsstring: the simplest way to create a string: nsstring * [email protected] "ZH"; used to output an OC string
Placeholder: % @Nslog (@ "% @", STR); Create an OC string using the nsstring method.
Stringwithformat (equivalent to string. format in C)Nsstring * STR = [nsstring stringwithformat: @ "My age is $ D and no is % d", age, no]; obtain the length of the current string (the calculated length includes spaces): int Len = [Str
Length]; Use placeholders for output
: % LDNslog (@ "[email protected]", [STR length]); defines a class with two files:. h declaration file and. m implementation file.
. H: Declaration of member variables and Methods
. M: Implementation of methodsTo use a class, you only need the. h file of the # import class.
# Pragma mark acquisition age: Use this method to mark the code
# Pragma mark-Get age: Minus signs indicate adding a horizontal line to the mark.
Objective-C: 05 _ object-oriented-development skills