Home > Blockchain >  VSCode Include path C
VSCode Include path C

Time:01-02

I am trying to learn C , but I am having trouble. When trying to compile my source file, I receive the below error message for all of my header files.

Error Message

I have tried adding multiple paths to my CPP properties file but am still having trouble identifying the problem.

enter image description here

Above is the properties file I previously mentioned.

enter image description here

Also, here is how my directory is set up. Any help is appreciated.

CodePudding user response:

So as far as I am able to understand, you are trying to run main.cpp that has a user defined header file Book.h But Book.h is in another directory so, try using

#include "../headers/Book.h"

Basically you need to give the location of Book.h file in respect to main.cpp

  • Related