0
#include "enum.h"

Using visual studio's the code above is what I had typed, in fact once I typed the double quotes it automatically provided me a list of all available header files in the directory the file I was working on was located.

It is also included under "Header Files", it certainly sees the file there, but intellisense isn't detecting it; additionally it seems to also be causing some other syntax errors further along the line, so I want to rule this out as an issue.

I read there was something about typing the path in the properties > VC++ Directories > Include Directories but I have no idea what the proper syntax is to make sure its properly included. Do I just need to link the route folder for my project or each individual header file?

It didn't use to cause this problem but at random now it does.

Edit: At some point after some unreproducible fiddling some of them work, though others don't for no explainable reason. Sometimes it will "work" and Intellisense won't complain, but after compiling, bam, error pops up again.

RaenirSalazar
  • 556
  • 1
  • 7
  • 20

2 Answers2

3

Yes, you need to make sure the path of all your own include files are present in Properties > VC++ Directories > Include Directories, (you don't need to worry about the standard library include files as compiler will already be able to find those). The directories in here should be separated by a ;. If you don't want to type the directory in manually you can click the down arrow to the right of Include Directories > Edit... > Add Directory Icon, then browse to the directory of your include file and add it like that.

eoinmullan
  • 1,157
  • 1
  • 9
  • 32
1

Something to try:

Right click the #include and click Open Document.

  1. If it can open the file then the IntelliSense is corrupted, and you will probably need to regenerate the IntelliSense file.
  2. If the file won't open, it will give you a message with the current folder paths that are searched, so you can copy your files there or search why is that your path wasn't searched

Check some other answers:

link1

link2

link3

Community
  • 1
  • 1
tatigo
  • 2,174
  • 1
  • 26
  • 32