title: Pointer at function: access the data inside a structure?
body: <p>I listed some example code below and the question is if there is a way for the function_name to access the value of number from struct_name?</p>
  
  <pre><code>typedef struct struct_name {  
  int number  
  void (*func)();  
  } * struct_name_ptr;  
  
  void function_name() {  
  //access number from struct  
  }
  
  main() {  
    struct_name_ptr newobject;  
    newobject-&gt;func=&amp;function_name;  
    newobject-&gt;func(); //can it print the value of the number in the structure above?  
  } 
  </code></pre>