title: Function in function argument in C
body: <p>I write this code but i recieve error. How can I implement a function in a function parameter?</p>
  
  <p>I want to make this:</p>
  
  <pre><code>A function that manipulates input file according to its function pointer parameter.
  The function should print the manipulated file content to the console. You have to
  implement following function pointers;
  a. void uppercase(char content[]); //converts all letters to
  uppercase
  b. void lowercase(char content[]); // converts all letters
  to lowercase
  c. void capitalize(char content[]); //capitalizes each word
  d. void toggle(char content[]); // converts lowercase
  letters to uppercase and uppercase letters to lowercase
  </code></pre>
  
  <p>My Code: </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  void text_file_manipulator( char str_filename[],int (*pf_convertion)( char content[]);
  
  
  int main(void)
  {
  
      int hour, minute, d_hour, d_minute, d_size, inc;
      double a, b, c, search_starting_point,step_size;
  
      puts("-------------------------------");
      printf("text_file_manipulator:\n");
      text_file_manipulator("in.txt", pf_convertion("uppercase"));
      text_file_manipulator("in.txt", pf_convertion("lowercase"));
      text_file_manipulator("in.txt", pf_convertion("capitalize"));
      text_file_manipulator("in.txt", pf_convertion("toggle"));
      puts("-------------------------------");
  }
  void text_file_manipulator( char str_filename[],int (*pf_convertion)( char content[])){
  
  }
  
  int pf_convertion( char content[]){
  
  }
  </code></pre>
  
  <p>Error message when I compile:</p>
  
  <pre><code>1.c: In function ‘main’:
  1.c:14:2: error: passing argument 2 of ‘text_file_manipulator’ makes pointer from integer without a cast
    text_file_manipulator("in.txt", pf_convertion("uppercase"));
    ^
  1.c:3:6: note: expected ‘int (*)(char *)’ but argument is of type ‘int’
   void text_file_manipulator( char str_filename[],int (*pf_convertion)( char content[]));
        ^
  
  1.c:15:2: error: passing argument 2 of ‘text_file_manipulator’ makes pointer from integer without a cast
    text_file_manipulator("in.txt", pf_convertion("lowercase"));
    ^
  1.c:3:6: note: expected ‘int (*)(char *)’ but argument is of type ‘int’
   void text_file_manipulator( char str_filename[],int (*pf_convertion)( char content[]));
        ^
  
  1.c:16:2: error: passing argument 2 of ‘text_file_manipulator’ makes pointer from integer without a cast
    text_file_manipulator("in.txt", pf_convertion("capitalize"));
    ^
  1.c:3:6: note: expected ‘int (*)(char *)’ but argument is of type ‘int’
   void text_file_manipulator( char str_filename[],int (*pf_convertion)( char content[]));
        ^
  </code></pre>
  
  <p>1.c:17:2: error: passing argument 2 of ‘text_file_manipulator’ makes pointer from integer without a cast
    text_file_manipulator("in.txt", pf_convertion("toggle"));
    ^
  1.c:3:6: note: expected ‘int (*)(char *)’ but argument is of type ‘int’
   void text_file_manipulator( char str_filename[],int (*pf_convertion)( char content[]));
        ^</p>