fstream.h should already be in your environment. However, for others, e.g. d3dx9.h, you may need to install additional SDK. For writing games, I would prefer you to install both Platform SDK and DirectX SDK. In addition, please ensure the the header files are under the location list in the "Include files" directory in your VC++ project. If not, please add the path accordingly.