title: Expression list treated as compound expression
body: <p>I'm trying to compile a program I got from the net. Trying to use  in codeblocks but its showing errors. I don't understand what is going wrong. I've looked up in various forums but not much light is shed. Can anyone help soon? Thanks in advance</p>
  
  <pre><code>#include &lt;functional&gt;
  #include &lt;iostream&gt;
  
  int print_num(int i, int j) { return i + j; }
  
  int main() {
      std::function&lt;int(int, int)&gt; foo = print_num;
      std::function&lt;int(int, int)&gt; bar;
  
      try {
          std::cout &lt;&lt; foo(10, 20) &lt;&lt; '\n';
          std::cout &lt;&lt; bar(10, 20) &lt;&lt; '\n';
      } catch (std::bad_function_call&amp; e) {
          std::cout &lt;&lt; "ERROR: Bad function call\n";
      }
  
      return 0;
  }
  </code></pre>
  
  <p>These are some of the errors other than 14 other errors saying declaration not done. I guess clearing these error would solve that problem.<br /></p>
  
  <blockquote>
    <p>main.cpp|10|error: <strong>'function' is not a member of 'std'</strong><br/>
    main.cpp|10|error: <strong>expression list treated as compound expression in functional cast [-fpermissive]</strong><br/>
    main.cpp|10|error: <strong>expected primary-expression before 'int'</strong></p>
  </blockquote>