c - Stringify a variable that can be a sequence of characters or a string value -


i have following macros:

#define stringify(x) #x #define tostring(x) stringify(x)                

and use them converting sequence of characters srting. example, if write:

puts(tostring(hi))                    

then hi printed screen (pay attention hi isn't variable, it's sequence of characters).

now want modify macros support case x string value or sequence of characters in example above. calrify, if write:

puts(tostring(hi)) 

or if write:

puts(tostring("hi")) 

i same results. possible modifing macros?


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -