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.