Visual C++ Developer Center > Visual C++ Forums > Visual C++ Language > can I get the preprocessor to disallow backslashes in #include file paths?
Ask a questionAsk a question
 

Answercan I get the preprocessor to disallow backslashes in #include file paths?

  • Thursday, November 05, 2009 8:07 PMeric.slosser Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    The C preprocessor in Visual Studio allows either forward or back slashes in the quoted string following a #include directive. 

    I'd like to disallow backslashes, so people working with Visual Studio wouldn't check code into the SCM repository that doesn't compile on other compilers.

    #include "path\to\foo.h"  // breaks the build

    • Edited byeric.slosser Thursday, November 05, 2009 8:10 PMclarification
    •  

Answers

All Replies