I. Warm up
int f(double (d)); // same as int f(double d);
int g(double (*pf)()); // g takes a pointer to a function as a parameter
int g(double pf()); // same as above; pf is implicitly a pointer
int g(double()); // same as above; parameter name is omitted
II. vexing parse
the function data takes two parameters
list<int>data(istream_iterator<int>(dataFile), istream_iterator<int>());
the proper way to declare data
list<int>data((istream_iterator<int>(dataFile)), istream_iterator<int>());
Note: It is not legal to surround a formal parameter declaration with parentheses, but it is legal to surround an argument to a function call with parentheses.
III. A better solution
ifstream dataFile("inst.dat");
istream_iterator<int>dataBegin(dataFile);
istream_iterator<int>dataEnd;
list<int>data(dataBegin, dataEnd);