Error on Employee example


#1

The BMI example ran fine in chapter 17 but when I added the Employee.h and .m files, I’m getting a Person.h: No such file or directory.

Any insight?

Thx,
–bd–


#2

The line should say

Do you have a Person.h file?


#3

Yep, remember your inheritance: an Employee is also a Person, so to work with Employee objects you also need to include Person.h and import it into your code in the appropriate places.


#4

DOH! I had <Person.h> instead of “Person.h”

And I’ve been so good at finding my own typos up to now …

Thanks for being tolerant of my newbe question. :wink:

–bd–


#5

I have the same issue. I went so far as dragging-in the Person.h and Person.m files from the BMIClass project…? I still get the error that Person.h can’t be found. (I’ve tried both <> and “”.)


#6

I think I mis-named files for the last example, opened the correct file and it works…!