Top "Stringification" questions

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

Convert a preprocessor token to a string

I'm looking for a way to convert a preprocessor token to a string. Specifically, I've somewhere got: #define MAX_LEN 16 …

c c-preprocessor stringification
What are the applications of the ## preprocessor operator and gotchas to consider?

As mentioned in many of my previous questions, I'm working through K&R, and am currently into the preprocessor. …

c c-preprocessor kernighan-and-ritchie stringification
Concatenate int to string using C Preprocessor

I'm trying to figure out how I can concatenate a #define'd int to a #define'd string using the C Preprocessor. …

c c-preprocessor stringification
Pragma in define macro

Is there some way to embed pragma statement in macro with other statements? I am trying to achieve something like: #…

c-preprocessor pragma stringification
# and ## in macros

#include <stdio.h> #define f(a,b) a##b #define g(a) #a #define h(a) g(a) …

c c-preprocessor stringification
Stringification - how does it work?

I know that: #define foo 4 #define str(s) #s with str(foo) writes out: "foo", because stringify is executed first …

c++ c c-preprocessor stringification
Convert a jQuery object and contents to string?

I'm grabbing various jquery objects to put into an array and later spit out as HTML. I'm trying to convert …

jquery stringification
Stringifying template arguments

Is it possible in C++ to stringify template arguments? I tried this: #define STRINGIFY(x) #x template <typename T&…

c++ templates c-preprocessor metadata stringification
C Preprocessor, Stringify the result of a macro

I want to stringify the result of a macro expansion. I've tried with the following: #define QUOTE(str) #str #define …

c-preprocessor stringification