I have also faced the same problem, but found a solution, after few tries.

Download CImg.h from the website - http://cimg.sourceforge.net/download.shtml
and place it in the same folder as the cpp...