How to add a user-created C++ include?

I’m attempting to refactor some shared logic across my classes into a single C++ header file. I’ve placed it in the Source/<MyProjectName>/ folder. However, when I attempt to compile the code from the UE4 editor, it fails with a No such file or directory error on my include line. I modified the include directories inside the project configuration, but that doesn’t seem to help.

How can I get the compiler to find my file?

This can change depending on your setup, but generally speaking…

If you have a header at this location: Source/MyProject/MyHeaderFile.h, then it should look like:

#include "MyHeaderFile.h"

If you have a header at location Source/MyProject/MyDirectory/MySubdirectory/MyHeaderFile.h, then it should look like:

#include "MyDirectory/MySubdirectory/MyHeaderFile.h"

I determined the problem, the location of the file was not where I thought VS indicated it was. I had created it initially in the wrong place, and dragged it to the project folder using the Solution Explorer pane. This, apparently, did not actually move it, and after manually moving it from the command line, I was able to build successfully.