You never define map in your header, so when ship.cpp wants to use it, it cannot find it as it has never been declared in that file. You could try adding the following code in your header file:
externchar map[25][10];
This declares your map variable. The extern part states that it is defined in another translation unit. You can simply think of a translation unit as a source file with all header files it includes.
Another quite important thing is that you are including the source file in your main.cpp file. You should always only include the header file (except when working with templates, but that's a special matter outside the scope of this question). So change: #include "ship.cpp" to #include "ship.h" .