title: Casting Pointers to int in c
body: <p>I have to learn it for my study. Is their any way to cast a pointer to integer. I have to give myEulerForward1 a pointer as a paramter and i always get this error message :</p>
  
  <pre><code>eulerZahl.c: In function ‘main’:
  eulerZahl.c:38:35: warning: passing argument 1 of ‘myEulerForward1’ makes pointer from integer without a cast [-Wint-conversion]
    double forward = myEulerForward1(k);
                                     ^
  eulerZahl.c:16:8: note: expected ‘int *’ but argument is of type ‘int’
   double myEulerForward1(int *n1){
          ^~~~~~~~~~~~~~~
  </code></pre>
  
  <p>Can someone help me with it?</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdint.h&gt;
  
  
  double kFactorial(int k){
  
  
      if(k &lt;= 1){
          return 1;
      }
  
      return k * kFactorial(k - 1);
  }
  
  
  double myEulerForward1(int *n1){
  
  
      double n = 1;   
      double euler, nFact = 1;
      for(int i = sizeof(&amp;n1); i &gt;= 0; i--){
          nFact*= i;
          euler = euler + (1.0/nFact);
      }
  
      return euler;
  
  }
  
  
  int main(){
  
      int k = 4;
      double factorial = kFactorial(k);
  
      printf("The factorial of %d is: %lf ", k, factorial); 
  
      double forward = myEulerForward1(k);
  
      printf("The Eulers Number: %lf", forward);
  }
  </code></pre>