How to resolve warning: multi-character character constant in Linux C++

后端 未结 2 1905
被撕碎了的回忆
被撕碎了的回忆 2021-01-29 04:49
#ifdef WIN32
#   define TARGET_OS \'W_NT\'

I am getting C++ warning in Linux multi-character character constant. at the below line. How to resolve this

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-29 05:06

    String constants use double quotes, single quotes are for character constants.

    To suppress the warning if this is what you mean you can use -Wno-multichar gcc option.

提交回复
热议问题