#"cannot open source file" in visual studio, despite including the header file in the project already

9 messages · Page 1 of 1 (latest)

sage flax
#

hi! i've done c++ using existing libraries and whatever before, but never made my own project completely from scratch - i'm trying to learn that at the moment so that i can improve my competency with c++. having issues trying to do #include <customheader.h>. apparently it doesn't exist, even though i have made sure it's included in the project from the context menu. i'm using Visual Studio.lpp

any suggestions would be really appreciated! 🙂

royal mirageBOT
#

@sage flax has reached level 1. GG!

sage flax
#

screencap of the solution explorer, in case it's useful

sage flax
#

okay i've figured it out now, my syntax was wrong - should use quotation marks, not arrow brackets for local files

#

@fleet topaz sorry if you had a solution in mind already.

fleet topaz
#

no worries, it's been a while since I was on VS (on Mac & Linux for a while) but I'll leave this here in case.

There is a difference between #include <some_header.h>
and #include "some_header.h"...

The first way will try to get a header from the system include directory, likely outside the project. The second way will try to get a header within the project directory. 👍

sage flax
#

thanks! does this community have a karma/voting system btw? @fleet topaz

fleet topaz
#

Hmm, I don't recall one. Just a few tags for categorizing posts.

sage flax
#

oh no worries. well thank you either way. have a nice day :))