home Forums # Technical Support Fuzzylite + CPP (Windows) + Hopefully Visual Studio Reply To: Fuzzylite + CPP (Windows) + Hopefully Visual Studio


I did successful import of fcl file in simple DummyFuzzy project.
But when we are trying the same code (or some variations) in TORCS it fails.

What we can do, is to create “empty” engine like this:
Engine * engine = new Engine();
It works, we can sysout the allocated address.

But it fails if we give e.g.
Engine * engine = new Engine("NAME");


Engine * engine = new Engine();

So it also fails if we do this:

ifstream ifs("D:\\rules.fcl");
	string rules2( (std::istreambuf_iterator<char>(ifs) ),
		(std::istreambuf_iterator<char>()    ) );
	printf("%s\n--------------------------\n", rules2.c_str()); //this works
	Engine * engine = fl::FllImporter().fromString(rules2.c_str());

	printf("CREATED \n"); // this do not print
	printf("%s\n", engine->getName().c_str());

And the last bit of code ends with:

  • This reply was modified 9 years, 5 months ago by Unknown.