title: Structures and Object creation
body: <p>I am busy with a task and i have to create a structure and with that structure i have to create and delete an object.</p>
  
  <p>Here is how i created the struct with a function inside.</p>
  
  <pre><code>struct Operation
  {
      char op;
      double (*apply)(Operation*, double,double); // takes two doubles
  }
  </code></pre>
  
  <p>That i perfectly understand. Now the object must be created.</p>
  
  <pre><code>Operation* Make(char op)
  {
      Operation* ret = new Operation;
      ret -&gt; op = op;
      ret -&gt; apply = doit;//doit is a norther function 
      return ret;
  }
  </code></pre>
  
  <p>I know the "->" operatic is the same as saying:</p>
  
  <pre><code>(*ret).op = op;
  </code></pre>
  
  <p>And the delete object;</p>
  
  <pre><code>void BrakeObject(Operation&amp; o)
  {
      delete o;
      o = NULL;
  }
  </code></pre>
  
  <p>Will the function (apply) look the same as a basic function? 
  Is this a array?</p>
  
  <pre><code> Operation* ret = new Operation;
  </code></pre>
  
  <p>What is the object is it just a function?</p>