title: How to call a function from another header file in C++?
body: <p>I have the following 3 files (1 *.cpp and 2 *.hpp) :</p>
  
  <p>the main program file:</p>
  
  <pre><code>// test.cpp
  
  #include&lt;iostream&gt;
  #include"first_func.hpp"
  #include"sec_func.hpp"
  
  int main()
  {
      double x;
      x = 2.3;
      std::cout &lt;&lt; sec_func(x) &lt;&lt; std::endl;
  }
  </code></pre>
  
  <p>-
  the first_func.hpp header:</p>
  
  <pre><code>// first_func.hpp
  
  ...
  
  double  first_func(double x, y, x)
  {
  
      return x + y + x;
  }
  </code></pre>
  
  <p>-
  the sec_func.hpp header:</p>
  
  <pre><code>// sec_func.hpp
  
  ...
  
  double sec_func(double x)
  {
          double a, b, c;
          a = 3.4;
          b = 3.3;
          c = 2.5;
  
          return first_func(a,b,c) + x;
  }
  </code></pre>
  
  <p>How do I properly call first_func from within the sec_func.hpp file?</p>