I want to ask a question about the objective-C or may be the C language. I want to ask what is the meaning of the following code of #define? Is it like to declare a variable?
#define kMountainNameString @"name"
#define kMountainHeightString @"height"
#define kMountainClimbedDateString @"climbedDate"
It’s a simple text substitution macro. Works the same as in C, C++.
Where kMountainNameString appears the compiler will “paste in”
@”name”. Technically speaking this occurs before the compiler by a mechanism called the preprocessor.