Top "Macros" questions

***DO NOT USE for VBA / MS-Office languages.

What is ":-!!" in C code?

I bumped into this strange macro code in /usr/include/linux/kernel.h: /* Force a compilation error if condition is …

c linux macros linux-kernel
__FILE__ macro shows full path

The standard predefined macro __FILE__ available in C shows the full path to the file. Is there any way to …

c file macros path
How to write macro for Notepad++?

I would like to write a macro for Notepad++ which should replace char1, char2, char3 with char4, char5, char6, respectively.

macros notepad++
What does "#pragma comment" mean?

What does #pragma comment mean in the following? #pragma comment(lib, "kernel32") #pragma comment(lib, "user32")

c++ visual-c++ macros pragma
C# Macro definitions in Preprocessor

Is C# able to define macros as is done in the C programming language with pre-processor statements? I would like …

c# macros c-preprocessor
how to use #ifdef with an OR condition?

Sorry for asking very basic question. I would like to set OR condition in #ifdef directive.? How to do that ? …

c macros
How to pass macro definition from "make" command line arguments (-D) to C source code?

I usually pass macro definitions from "make command line" to a "makefile" using the option : -Dname=value. The definition is …

c macros makefile
What is the worst real-world macros/pre-processor abuse you've ever come across?

What is the worst real-world macros/pre-processor abuse you've ever come across (please no contrived IOCCC answers *haha*)? Please add …

c++ c macros preprocessor
How do I show the value of a #define at compile-time?

I am trying to figure out what version of Boost my code thinks it's using. I want to do something …

macros c-preprocessor boost-preprocessor
How to identify platform/compiler from preprocessor macros?

I'm writing a cross-platform code, which should compile at linux, windows, Mac OS. On windows, I must support visual studio …

c++ macros cross-platform c-preprocessor