Is there a correct way of installing FLTK (say. 1.3.2) on vs 2013 and get it ran below code successfully?
1 2 3 4 5 6 7 8 9 10
#include <Simple_window.h>
int main()
{
Simple_window win(Point(100, 100), 1000, 600, "test");
Circle c(Point(200, 200), 50);
win.attach(c);
win.wait_for_button();
}
I got this error: Error 16 error C2440: 'return' : cannot convert from 'std::ifstream' to 'bool' c:\program files\microsoft visual studio 12.0\vc\include\graph.cpp 371 1 Win32Project1
Basically you need to change line 5 to returnstatic_cast<bool>(ff);
It looks like an error in original code. I am still not sure if it is that way, but it looks like returning a value implicitely convert it to return type (as opposed to explicitely)
As operator bool is explicit it cannot be used in implicit conversions.