do i really need to include cpp files on main function?
Does main.cpp use any iostream functions such as cout? If so, then yes you need <iostream>. If not, you don't need it.
should i include iostream on board.cpp instead on main
board.cpp clearly uses cout, so yes you need it.
board.cpp and main.cpp are separate compilations. board.cpp would know nothing about whether <iostream> was included in main.cpp or not.
okay i get it all.
last,
is it alright that i include the board.h in board.cpp?
then the only library or header included in main.cpp is board.cpp.
like this:
main.cpp
> do i really need to include cpp files on main function?
no, don't include *.cpp
you may have redefinition errors, and kill the purpose of a linker (having to recompile all the files if you make a modification in any file)
> is it alright that i include the board.h in board.cpp?
each source should be self contained (can be compiled separately)
each header should be self contained (don't need to add other headers prior or after it)