Wednesday, March 25, 2015

How to add header file in Visul stidio 2008

If you write in your code something like #include "FileWrite.h" you need to make sure compiler can find that file. There are three options:

  • FileWrite.h should either be in the same directory as your source code file (.cpp) or
  • Path to that header file should should be listed in project's Properties (in C/C++ -> General -> Additional Include Directories) or
  • Path could be set in your VisualStudio - add it to Include Files in Tools->Options->Projects and Solutions->VC++ Directories

Which of these options shell be used depends on whether that header originates from this project (1st option) or some other project (any of other two options).


Thursday, March 19, 2015