Where does Visual Studio 2015 look for header files?

Where should one put the header file so that visual studio automatically finds it when I open the project? I put in the same folder as source.cpp and it failed to find with #include invocation.
Could you post your code (at least your include section)?
#include <filename> or #include "filename" ??

If you use <filename> it only looks in the directories on the search path -- this is intended for library and system headers (e.g. <iostream> <window.h>, etc.

If you use "filename" it will first look in the current project directory and only search along the path if it didn't find it in the project directory.

Andy

PS To see where Visual Studio looks open your project properties and look at the "VC++ Directories" under "Configuration Properties" (for Visual Studio 2010 on newer.)

VC++ Directories Property Page
https://msdn.microsoft.com/en-us/library/ee855621%28v=vs.140%29.aspx
Last edited on
I put all headers in a folder under Projects-> ConsoleApplication, doesn't find them still.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

#include <iostream>
#include "ccc_win.h"
using namespace std;

int ccc_win_main()
{
	Circle c(Point(0, 0), 1);

	cwin << c;
	};

system("pause");
	return 0;
}
Topic archived. No new replies allowed.