刚看了园子里的 VC include 路径解析
http://www.cppblog.com/nightsky0911/articles/176503.html
又想起了include的其它表示方式,在VS2010里测试了下:
头文件为:F:\MYDOC\Visual Studio 2010\Projects\TestDlls\FirstDll\FirstDll.h
工程文件TestDlls在目录F:\MYDOC\Visual Studio 2010\Projects\TestDlls\TestDlls下
以下#include在VC2010中均可编译通过:
#include "FirstDll.h" //事先已将FirstDll路径添加至INCLUDE目录
#include "../FirstDll/FirstDll.h"
#include "..\FirstDll\FirstDll.h"
#include "./..\FirstDll\FirstDll.h"
#include "./../FirstDll/FirstDll.h"
#include "./..\\FirstDll\\FirstDll.h"
#include "./../FirstDll/FirstDll.h"
#include "F:\MYDOC\Visual Studio 2010\Projects\TestDlls\FirstDll\FirstDll.h"
#include "F:\\MYDOC\\Visual Studio 2010\\Projects\\TestDlls\\FirstDll\\FirstDll.h"
验证表明VC2010 include 中
1.“./”使用与否均能被识别
2.从识别结果上看“/”=“\”=“\\”
是不是VC2010把连续符号识别成一个呢,再试:
#include "..FirstDll///FirstDll.h"
#include "..\\\\\\FirstDll\\\\\\FirstDll.h"
上面两句都能通过编译..........