예제 #1
0
//get_working_dir
std::string get_working_dir()
{
	char buff[FILENAME_MAX];
	GetCurrentDir(buff, FILENAME_MAX);
	std::string current_working_dir(buff);
	return current_working_dir;
}
예제 #2
0
std::string GetCurrentWorkingDir(void) {
  char buff[FILENAME_MAX];
  auto result = GetCurrentDir(buff, FILENAME_MAX);
  if (result) {
    std::string current_working_dir(buff);
    return current_working_dir;
  }
  return "";
}