Hello,
My name is Jeff Summers, and I'm a PhD student. I'm an experienced user of the Sage interface to PPL, but I am new to using it directly (and new to C++). I am aiming low, and trying to print a single constraint as described in the C++ manual for users (page 218). I simplified the code to:
#include <iostream>
#include <ppl.hh>
using namespace std;
using namespace Parma_Polyhedra_Library;
int main()
{
Variable x(0);
Variable y(1);
Constraint c1(x - 5*y<= 4);
cout << "Constraint c1: " << c1 << endl;
return 0l
}
which I attempt to compile using: g++ -g test.cpp -lppl -lgmpxx -lgmp
I get the following:
test.cpp: In function ‘int main()’:
test.cpp:12:29: error: no match for ‘operator<<’ (operand types are ‘std::basic_ostream<char>’ and ‘Parma_Polyhedra_Library::Constraint’)
cout << "Constraint c1: " << c1 << endl;
[...]
The compiler does not like that I am trying to print c1. I assume that I have done something foolish, and I appreciate any help. Thanks!
Best,
Jeff