how to include header file

Jan 12, 2013 at 12:31pm
i want to include a header file which is in the same directory of source file..i am using visual c++2010..
Jan 12, 2013 at 12:37pm
Can't you just do #include "name_of_header_file.h" ?
Jan 12, 2013 at 1:04pm
I tried this as #include<header.h>
bt its not working...
Jan 12, 2013 at 1:26pm
You first have to add it to your project. In the Solution Explorer rightclick 'Header Files'->Add->Existing Item, then find your header file and double click it. #include "name_of_header_file.h" should work now.
Jan 12, 2013 at 1:45pm
You shouldn't actually need to add it to your solution. Just include with quotes instead of with <>.
Jan 12, 2013 at 2:58pm
working as #include"name.h" thanks to all.
Topic archived. No new replies allowed.