Top "C-preprocessor" questions

A textual macro processor applied before compiling C and C++ language programs.

Can I redefine a C++ macro then define it back?

I am using both the JUCE Library and a number of Boost headers in my code. Juce defines "T" as …

c++ boost macros c-preprocessor
Why would somebody use an #if 1 C preprocessor directive?

I am looking through some C source code and I don't understand the following part #if 1 typedef unsigned short PronId; …

c-preprocessor preprocessor-directive
Preprocessor macro value to Objective-C string literal

I have a preprocessor macro defined in build settings FOO=BAR That value I want to massage into an Objective-C …

objective-c cocoa cocoa-touch c-preprocessor stringification
How to #define based on iOS version?

I have a Constants.h file in my app, where I #define app-wide things for easy access later. I'm having …

ios objective-c c-preprocessor ifdefine
Can I make a preprocessor directive dependent on the .NET framework version?

Here's a concrete example of what I want to do. Consider the string.Join function. Pre-.NET 4.0, there were only …

c# .net frameworks c-preprocessor preprocessor-directive
What does ## mean for the C(C++) preprocessor?

I have a C program below: #define f(g,g2) g##g2 main() { int var12=100; printf("%d",f(var,12)); } when …

c c-preprocessor stringification
Can I define variadic C preprocessor macros with __VA_ARGS in the middle instead of the end?

GCC complains if I do this: #define M(obj,met, ..., contents) obj##_##met(const void * self, __VA_ARGS__) { \ contents \ } Giving …

c gcc c-preprocessor c99 variadic-macros
What does the # and ## means in C preprocessor macro of c++

I read the following code: #define MACRO(abc, def) {#def ## #abc} char result[10] = MARCO(abc, def); I know the ## operator …

c macros c-preprocessor stringification
Invalid preprocessing directive for #elseifdef in Xcode

Why: #ifdef SOME_TARGET_FLAG <some code here> #elseifdef SOME_ANOTHER_TARGET_FLAG <some another code here&…

objective-c xcode c-preprocessor preprocessor-directive
Is #ifdef MACRO equivalent to a comment

Assuming that MACRO is not defined, are these equivalent #ifdef MACRO Not valid C or C++ code #endif /* Not valid …

c comments c-preprocessor conditional-compilation