Click here to Skip to main content
15,888,610 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using #include "john.h". which is in the c:\ directory how do I get the main program to use this header file?
C++
// 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.

John
Posted
Updated 19-Nov-10 14:51pm
v2

1 solution

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.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900