The implementation file does not see the header file

Write your question here.
I have a header file( employee.h) and an Implementation file (employee.cpp) but I cannot compile the the implementation file. I get an error that says there is no such a header file.
 
  8	22	E:\Savichexamples\SourceCode\Chapter15\15-02.cpp	[Error] employee.h: No such file or directory.
The header file should be in the same directory than the source file.
Or it should be in any of the directories in the include path (like /usr/include/ )
Or you need to specify the directory in which it is (-I flag)
They are in the same directory. see chapter 15 on Savitch
Chapter 15 is one folder.
we have
15-01
15-02
15-03
15-04
15-06
15-07
All about employee inheritance. but when I compile the main program in 15-07

//DISPLAY 15.7 Using Derived Classes
#include <iostream>
#include "hourlyemployee.h"
#include "salariedemployee.h"
using std::cout;
using std::endl;
using namespace employeessavitch;

int main( )
{
HourlyEmployee joe;
joe.set_name("Mighty Joe");
joe.set_ssn("123-45-6789");
joe.set_rate(20.50);
joe.set_hours(40);
cout << "Check for " << joe.get_name( )
<< " for " << joe.get_hours( ) << " hours.\n";
joe.print_check( );
cout << endl;

SalariedEmployee boss("Mr. Big Shot", "987-65-4321", 10500.50);
cout << "Check for " << boss.get_name( ) << endl;
boss.print_check( );

return 0;
}
but when I compile I get this:
3 28 E:\Savichexamples\SourceCode\Chapter15\15-07.cpp [Error] hourlyemployee.h: No such file or directory
compilation terminated.
> see chapter 15 on Savitch
https://www.cs.colorado.edu/~main/dscode.html
chapter 15: Graphs
(I have an small feeling that you are not referring to that one)


May check permissions, check that the filename is actually that (case sensitive, phantom spaces)

Try to comment the #include "hourlyemployee.h" line and compile with -include hourlyemployee.h flag


¿why did your error message change?
The message changed but I still got an error on ( -include hourlyemployee.h). But when I put all the seven files (15-01 to 15-07) in one big file the program runs 100% correct.
I have resolved my problem.
Thank you all.
Topic archived. No new replies allowed.