diff --git a/src/bisection-simpler-example2-gradient.cc b/src/bisection-simpler-example2-gradient.cc
index ec76afa8900a987537c93a403a07b4bd749f34ea..90d09a43e6b9e3045445192ea1fcbdcbad0c23d1 100644
--- a/src/bisection-simpler-example2-gradient.cc
+++ b/src/bisection-simpler-example2-gradient.cc
@@ -15,6 +15,8 @@
 #include <cstdlib>
 #include <limits>
 
+#include <iostream>
+
 template <int dimension>
 class SampleFunctional : public SmallFunctional<dimension> {
 public: