Home c++ Unable to connect the header file

Unable to connect the header file




I use Visual Studio 2013, the desired file with the extension “.h” (RANDOMC.H) added to the header file folder.
Then in the source code I write #include “Randomc.h”
But he does not find a file: Unable to open the source file “Randomc.h”
Similarly, when connected .CPP files.
These files have already put in the directory with the project, the same thing is the same.

Answer 1, Authority 100%

In the project properties in the Additional Include Directories parameter, you must specify the path to all folders (different from the project’s root folder and the standard library), where you lie * .h

Answer 2, Authority 25%

If you are 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.

Answer 3

In order not to be wrong, it is better to use “”, the difference is that in this way first the search in the directory where the file is located, and then where it is usually searched for & lt; & gt;

Answer 4

#include "./randomc.h"

If the file is root

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions