Quick Question: Whats wrong with this pre-processor directive in C#

前端 未结 3 478
广开言路
广开言路 2021-01-16 14:31

Whats wrong with these pre-processor directive in C#

#define OUTPUT_DIRECTORY \"E:\\asdf\\sdfg\\jhkl\\\"

I also tried giving:



        
3条回答
  •  北恋
    北恋 (楼主)
    2021-01-16 15:27

    You cannot give that symbol (OUTPUT_DIRECTORY) a value, the symbol can only be "defined" or "undefined" so you can use it in a #if OUTPUT_DIRECTORY ... #endif.

    See http://msdn.microsoft.com/en-us/library/yt3yck0x(VS.71).aspx

提交回复
热议问题