Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: VC10.0
I am using #include "john.h". which is in the c:\ directory how do I get the main program to use this header file?
// john.cpp : Defines the entry point for the console application.


#include "stdafx.h"
#include "john.h"

int _tmain(int argc, _TCHAR* argv[])
    return 0;

Error: Cannot find source file john.h
where do I put john.h so it will find it.
Posted 19-Nov-10 15:19pm
Edited 19-Nov-10 15:51pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

put "john.h" in the same directory as your project. I'm not sure, but if you wanted to include a header from the c drive root, then you could (maybe) put something like
#include "c:\header.h"
again, I'm not sure about that one.
Just a note, generally you use <> for global includes and "" for local, project specific ones.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Advertise | Privacy | Mobile
Web01 | 2.8.150302.1 | Last Updated 19 Nov 2010
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100