Top "Preprocessor-directive" questions

Instructions to a preprocessor that control how it modifies source text

How are the __cplusplus directive defined in various compilers?

My compiler expands it to 199711L. What does that mean? I read that __cplusplus > 199711L signifies C++11. What are …

c++ preprocessor-directive compiler-version
Is it possible to compare #ifdef values for conditional use

I'm trying to come up with a generic, easy to use way to only run certain code, depending upon the …

c++ conditional c-preprocessor preprocessor-directive
Unterminated conditional directive in Xcode

What's wrong here: #define CONTROLS_OFFSET 100 #ifdef CONTROLS_OFFSET//Unterminated conditional directive it says #define FIND_MAIN_MENU 3 Why do …

objective-c xcode preprocessor-directive
Why can std::max and std::min still be used even if I didn't #include <algorithm>?

#include <iostream> int main() { int value1 = 1, value2 = 10; std::cout << "Min = " << std::min(value1,value2) &…

c++ preprocessor-directive include-guards
C Preprocessor testing definedness of multiple macros

I searched the site but did not find the answer I was looking for so here is a really quick …

c c-preprocessor logical-operators preprocessor-directive
Force the compiler to ignore some lines in the program

Suppose that I have 10,000 lines of C++ code. 200 lines of this code are for testing purpose (for example, check the …

c++ preprocessor-directive
When to use preprocessor directives in .net?

I think this is a simple question so I assume I'm missing something obvious. I don't really ever use preprocessor …

c# .net c-preprocessor preprocessor-directive
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
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
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