title: How to call C++ functions of a class from a Python
body: <p>I tried with the link: <a href="https://stackoverflow.com/questions/145270/calling-c-c-from-python">Calling C/C++ from python?</a>, but I am not able to do the same, here I have problem of declaring extern "C".so please suggest suppose I have the function called 'function.cpp' and I have to call this function in the python code. function.cpp is:</p>
  
  <pre><code>int max(int num1, int num2) 
   {
    // local variable declaration
    int result;
  
    if (num1 &gt; num2)
      result = num1;
    else
      result = num2;
  
    return result; 
   }
  </code></pre>
  
  <p>Then how i can call this function in python, as I am new for c++. I heard about the 'cython' but I have no idea about it.</p>