You included array_of_int.h
which, before defining array_of_int
, included iterator_of_array_int.h
. So when the compiler sees your error line, it hasn't seen any declaration of the name array_of_int
. The error message isn't one of the more helpful ones issued by a compiler.
I'm in the habit of forward-declaring classes in headers; that's all you need in iterator_of_array_int.h
, so replace the include
line with class array_of_int;
and that one's good.