Unable to attach header file

I use Visual Studio 2013, in the project I added the necessary file with the extension ".h" (randomc.h) to the header files folder. Then in the source code I write #include "randomc.h" but it doesn't find the file: it can't open the source file "randomc.h" Similarly when connecting .cpp files. These files are already even put in the directory with the project, it's still the same.

Author: newt, 2015-06-25

4 answers

In the project properties, in the Additional Include Directories parameter, you must specify the path to all folders (other than the root folder of the project and the standard library), where*. h

 3
Author: Герман Борисов, 2017-03-10 09:42:35

If you have written #include "randomc.h", then randomc.h must be in the same directory as the file in which it is written. This is if you do not consider additional directories for include.

 1
Author: Владимир Мартьянов, 2015-06-25 09:20:40

To avoid mistakes, it is better to just use " ", the difference is that this way the search is first in the directory where the file is located, and then in the place where it is usually searched for with

 0
Author: , 2018-04-06 18:40:20

#include "./randomc.h"

If the file is in the root

 -2
Author: sotoros, 2017-09-12 15:58:26