C++ Macros: manipulating a parameter (specific example)

后端 未结 3 2096
太阳男子
太阳男子 2021-02-04 19:34

I need to replace

GET(\"any_name\")

with

String str_any_name = getFunction(\"any_name\");

The hard part is ho

3条回答
  •  旧时难觅i
    2021-02-04 20:26

    In answer to your question, no, you can't "strip off" the quotes in C++. But as other answers demonstrate, you can "add them on." Since you will always be working with a string literal anyway (right?), you should be able to switch to the new method.

提交回复
热议问题