Top "Stringification" questions

Stringification refers to the use of the `#` operator in a **C** preprocessor macro to use an argument as a string.

C Macros to create strings

Alternative Titles (to aid search) Convert a preprocessor token to a string How to make a char string from a …

c macros c-preprocessor stringification
How, exactly, does the double-stringize trick work?

At least some C preprocessors let you stringize the value of a macro, rather than its name, by passing it …

c c-preprocessor stringification
Why can't you stringify a function expression?

Why doesn't this produce anything? console.log(JSON.stringify(function(){console.log('foobar');}));

javascript json function stringification
What are some tricks I can use with macros?

In our legacy code, as well as our modern code, we use macros to perform nifty solutions like code generations, …

c++ c c-preprocessor stringification
Getting JSON data of JSTree, and it's metadata

We're using jstree for a navigation menu editor, and have been assigning metadata to the nodes of the tree like …

jquery json metadata jstree stringification
C Macro Token Concatenation involving a variable - is it possible?

I'm trying to define a macro to generate a token name, containing a variable. Basically, what I'm trying is this: #…

c concatenation token c-preprocessor stringification
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
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
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
Error when defining a stringising macro with __VA_ARGS__

I have been trying to implement a function macro in C that prepends "DEBUG: ", to the argument, and passes its …

c macros c-preprocessor variadic-macros stringification