title: Reference to ' ' is ambiguous
body: <p>I am sorry but i don't know why this algorithm is not working.
  The error at compiling is : "Reference to 'function' is ambiguous " and is on <strong>y = function()</strong> line, where I am calling the function</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;math.h&gt;
  #define PI 3.141
  float function(int g, int m, int s, float z)
  {
      using namespace std;
      z = (g + m/60.0 + s/3600.0)*PI/180.0;
      return z;
  }
  int main()
  {
       using namespace std;
  
      float y;
      int g,m,s;
  
      cout &lt;&lt; "g = ";
      cin &gt;&gt; g;
      cout &lt;&lt;"m = ";
      cin &gt;&gt; m;
      cout&lt;&lt;"s= ";
      cin &gt;&gt;s;
  
      y = function();
      cout &lt;&lt; "y= " &lt;&lt; y &lt;&lt; endl;
      //cout&lt;&lt; (g + m/60.0 + s/3600.0)*PI/180.0 &lt;&lt; endl;
      return 0;
  }
  </code></pre>
  
  <p>Vers2 - updated:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;math.h&gt;
  #define PI 3.141
  float function(int g, int m, int s)
  {
      //using namespace std;
      float z = (g + m/60.0 + s/3600.0)*PI/180.0;
      //std::cout &lt;&lt; z &lt;&lt;std::endl;
      return z;
  }
  int main()
  {
      // using namespace std;
  
      float y;
      int g,m,s;
  
      std::cout &lt;&lt; "g = ";
      std::cin &gt;&gt; g;
      std::cout &lt;&lt;"m = ";
      std::cin &gt;&gt; m;
      std::cout&lt;&lt;"s= ";
      std::cin &gt;&gt;s;
  
      function();
    //  std::cout &lt;&lt; "y= " &lt;&lt; y &lt;&lt; std::endl;
      //cout&lt;&lt; (g + m/60.0 + s/3600.0)*PI/180.0 &lt;&lt; endl;
      return 0;
  }
  </code></pre>