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;
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.
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.