-
August 3rd, 2010, 03:32 PM
#1
Knowing which standards are being used?
Is there a way to know what set of standards are being used for a specific compiler. I'm revamping one of my libraries and I would like to use const values in some of my methods, but I know that a lot of companies require code be C89 compatible, where there is no const. Is there some preprocessor definition that will allow me to do this on any compiler, or do I have to add a compiler option myself.
Code:
#ifdef C89_COMPATIBLE
#define _const
#else
#define _const const
#endif
void foo(_const char * str);
Is there a standard macro for that?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|