Class Problem (c++ and prolog)
- by Joshua Green
I am using the C++ interface to Prolog (the classes and methods of SWI-cpp.h). For working out a simple backtracking that john likes mary and emma and sara:
likes(john, mary).
likes(john, emma).
likes(john, ashley).
I can just do:
{
PlFrame fr;
PlTermv av(2);
av[0] = PlCompound("john");
PlQuery q("likes", av);
while…