read

Add in header (.h) file:
<ol><li>Create a UNIQUE_CLASS_H identifier (this is used to avoid import link errors in compilation) BE CAREFUL: this identifier must be diferent for each .h file.</li><li>Inside de define .. add each define for each constant:</li></ol>
<pre style="background-image: URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"> #ifndef UNIQUE_CLASS_H
#define UNIQUE_CLASS_H
#define MY_STRING_CONSTANT @"Value for constant"
#define MY_INT_CONSTANT 23
#endif
</pre>
Source

Blog Logo

Daniel Gomez Rico


Published

Image

MakinGIANTS

The findings and tips records of an Android-iOS-TheWholeShabang group

Back to Overview