You must store the returned std::string, not a pointer to its content. Otherwise, like Silvah explaines, the std::string is destroyed and the pointer points to invalid data.
std::string cString = string.ToAnsiString();
FILE * file = fopen(cString.c_str(), "rb");