application path
This commit is contained in:
20
exe_path.cpp
Normal file
20
exe_path.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#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() {}
|
||||
Reference in New Issue
Block a user