You can make use of the header file fileversioninfo.h
This has methods to find out if a directory exists or a file exists. Below is a small example I used in unit tests to find out if a directory actually exists in mozilla firefox.
typedef std::basic_string myType;
profileIn = <>
Append a directory to the main string
bool isDir = PathIsDirectory((profileInf.append(Lextensions)).c_str());
Call CPPUnit to check if that particular directory is present or not.
CPPUNIT_ASSERT_MESSAGE(Error getting firefox profile directory<>,isDir == true);