Top "C-preprocessor" questions

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

C/C++ line number

In the sake of debugging purposes, can I get the line number in C/C++ compilers? (standard way or specific …

c++ c c-preprocessor line-numbers dynamic-compilation
Preprocessor check if multiple defines are not defined

I have a selection of #defines in a header that are user editable and so I subsequently wish to check …

c c-preprocessor
Error: macro names must be identifiers using #ifdef 0

I have the source code of an application written in C++ and I just want to comment something using: #ifdef 0 ... #…

c++ macros c-preprocessor
How to define a preprocessor symbol in Xcode

Is it possible to set a symbol for conditional compilation by setting up properties in an Xcode project? My aim …

objective-c xcode c-preprocessor
What exactly does an #if 0 ..... #endif block do?

In C/C++ What happens to code placed between an #if 0/#endif block? #if 0 //Code goes here #endif Does the …

c-preprocessor
Why use apparently meaningless do-while and if-else statements in macros?

In many C/C++ macros I'm seeing the code of the macro wrapped in what seems like a meaningless do …

c++ c c-preprocessor c++-faq
"No newline at end of file" compiler warning

What is the reason for the following warning in some C++ compilers? No newline at end of file Why should …

c++ compiler-construction warnings c-preprocessor
How do I see a C/C++ source file after preprocessing in Visual Studio?

Let's say I have a source file with many preprocessor directives. Is it possible to see how it looks after …

c++ c debugging visual-studio-2005 c-preprocessor
When are C++ macros beneficial?

The C preprocessor is justifiably feared and shunned by the C++ community. In-lined functions, consts and templates are usually a …

c++ c-preprocessor