home › Forums › # Technical Support › How to use .fcl file › Reply To: How to use .fcl file
August 5, 2014 at 08:02
#1258
Keymaster
Hi,
std::string path = "fuzzylite/examples/mamdani/SimpleDimmer.fcl";
std::ifstream reader(path.c_str());
if (not reader.is_open()) {
throw fl::Exception("[file error] file <" + path + "> could not be opened", FL_AT);
}
std::ostringstream textEngine;
std::string line;
while (std::getline(reader, line)) {
textEngine << line << std::endl;
}
reader.close();
Engine* engine = FclImporter().fromString(textEngine.str());