Files
yellownotes/exe_path.cpp
2025-11-24 14:52:58 +01:00

21 lines
391 B
C++

#include "exe_path.h"
#include "utils/whereami.h"
#include <iostream>
std::string WhereAmI::containing_folder()
{
int len = wai_getExecutablePath(NULL, 0, NULL);
char *path = static_cast<char *>(malloc(len + 1));
wai_getExecutablePath(path, len, NULL);
path[len] = '\0';
std::string p(path);
std::cout << p << std::endl;
return p;
}
WhereAmI::WhereAmI() {}