What does the # symbol mean when using a variable in the #define macro as a prefix?
For example,
#define my_setopt(x,y,z) _my_setopt(x, 0, config, #y, y, z)
This is a Stringizing Operator that converts macro parameters to string literals.
So in your example:
my_setopt(1, 2, 3)
will expand to:
_my_setopt(1, 0, config, "2", 2, 3)
#quotes the expression. For example:
#
#define SHOW(BAR) printf("%s is %d\n", #BAR , BAR) SHOW(3+5); // prints: 3+5 is 8
Source: https://habr.com/ru/post/1716506/More articles:catch (QuotaExceededException ex) and get something useful? - c #Почему родительский объект не сбой с ранее установленным дочерним объектом? - .netHow to distinguish between a web application or a standalone application.? - javaAny good tips for a PHP programmer starting a GWT project? - javaHTML / CSS - checking for links to files - htmlXmlHttp Request The main authentication problem is authenticationNSInvalidArgumentException - iphoneCoding of architectural issues - designHow to create a site for a non-constructor that makes full use of jQuery on the client? - jqueryAccess last created row in PHP / MySQL - phpAll Articles