Jan 12, 2013 at 12:31pm Jan 12, 2013 at 12:31pm UTC
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 Jan 12, 2013 at 12:37pm UTC
Can't you just do #include "name_of_header_file.h"
?
Jan 12, 2013 at 1:04pm Jan 12, 2013 at 1:04pm UTC
I tried this as #include<header.h>
bt its not working...
Jan 12, 2013 at 1:26pm Jan 12, 2013 at 1:26pm UTC
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 Jan 12, 2013 at 1:45pm UTC
You shouldn't actually need to add it to your solution. Just include with quotes instead of with <>.
Jan 12, 2013 at 2:58pm Jan 12, 2013 at 2:58pm UTC
working as #include"name.h"
thanks to all.