c - Use name of #define parameter without stringification -


is there way exact words passed #define without stringifying? example use case:

#define num 1  #define create_fun(x) \ void prefix_x() { \ // used exact words passed in     int x = x; \ // use value later on }  create_fun(num) 

and output like:

void prefix_num() {     int x = 1; } 

use token concatenation (##):

#define num 1  #define create_fun(x) \ void prefix_##x() { \     int x = x; \ }  create_fun(num) 

Comments

Popular posts from this blog

c - Calling a function within a loop -

vb.net - Unbound DataGridView add row with checkbox error -

How i fill combobox items in Radgridview manually using in vb.net -