Closed. This question is off-topic。它当前不接受答案。
                            
                        
                    
                
                            
                                
                
                        
                            
                        
                    
                        
                            想改善这个问题吗? Update the question,所以它是on-topic,用于堆栈溢出。
                        
                        5年前关闭。
                                                                                            
                
        
我正在写以下内容

#ifdef points
#define points

class Points
{
};

#endif


后来,我发现我不能声明点数;

我必须换成

#ifdef points_h
#define points_h


那么,ifdef不区分大小写吗?

最佳答案

为什么不自己尝试呢?

#include <iostream>

#define points

int main() {
    #ifdef Points
      std::cout << "yes";
    #else
      std::cout << "no"; //this happens
    #endif
    return 0;
}

关于c++ - C预编译器不区分大小写吗? ,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/26826080/

10-11 03:46