#include <cstring> int main(int argc, char * argv[]) { // Find assets. auto const assets = strchr(argv[0], '/') ? std::string{} + "assets" : std::string{} + "/usr/share/" + prog + "/assets"; }