ARTICLE AD BOX
bool createProject(const char* directory) {
std::string ending = "\\project.cfg";
std::string completeDirectory = directory + ending;
std::ofstream config;
config.open(completeDirectory.c_str());
printf("%s\n", completeDirectory.c_str());
return true;
}
if (option == "Open Folder") {
Fl_Native_File_Chooser chooser;
chooser.title("Open Folder");
chooser.type(Fl_Native_File_Chooser::BROWSE_DIRECTORY);
chooser.directory("C:\\");
switch (chooser.show()) {
case -1: break;
case 1: break;
default: if (chooser.directory() == NULL) {directoryData = (char*)chooser.directory();
createProject(directoryData);
} break;
}
}
this code seems to not create the project when i want it to create the project even though i got the file creation to work well over a year ago but not now apparently, i'm not a professional with 20 years of experience but i do this part time just for fun and for the sake of learning new things.
suggestions are appreciated!
